]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-90319.rs
Rollup merge of #100220 - scottmcm:fix-by-ref-sized, r=joshtriplett
[rust.git] / src / test / 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 }