summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/issue-90319.rs
blob: 57e6ac7cf34f52d4b63e8753bf37e8b50aece5dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
struct Wrapper<T>(T);

trait Trait {
    fn method(&self) {}
}

impl<'a, T> Trait for Wrapper<&'a T> where Wrapper<T>: Trait {}

fn get<T>() -> T {
    unimplemented!()
}

fn main() {
    let thing = get::<Thing>();//~ERROR cannot find type `Thing` in this scope [E0412]
    let wrapper = Wrapper(thing);
    Trait::method(&wrapper);
}