]>
Commit | Line | Data |
---|---|---|
ee023bcb FG |
1 | struct Wrapper<T>(T); |
2 | ||
3 | trait Trait { | |
4 | fn method(&self) {} | |
5 | } | |
6 | ||
7 | impl<'a, T> Trait for Wrapper<&'a T> where Wrapper<T>: Trait {} | |
8 | ||
9 | fn get<T>() -> T { | |
10 | unimplemented!() | |
11 | } | |
12 | ||
13 | fn main() { | |
14 | let thing = get::<Thing>();//~ERROR cannot find type `Thing` in this scope [E0412] | |
15 | let wrapper = Wrapper(thing); | |
16 | Trait::method(&wrapper); | |
17 | } |