]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/suggest-fully-qualified-path-with-appropriate-params.rs
Add regression test for #82830
[rust.git] / src / test / ui / traits / suggest-fully-qualified-path-with-appropriate-params.rs
1 struct Thing;
2
3 trait Method<T> {
4     fn method(&self) -> T;
5     fn mut_method(&mut self) -> T;
6 }
7
8 impl Method<i32> for Thing {
9     fn method(&self) -> i32 { 0 }
10     fn mut_method(&mut self) -> i32 { 0 }
11 }
12
13 impl Method<u32> for Thing {
14     fn method(&self) -> u32 { 0 }
15     fn mut_method(&mut self) -> u32 { 0 }
16 }
17
18 fn main() {
19     let thing = Thing;
20     thing.method();
21     //~^ ERROR type annotations needed
22     //~| ERROR type annotations needed
23     thing.mut_method(); //~ ERROR type annotations needed
24 }