]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-90319.rs
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / ui / typeck / issue-90319.rs
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 }