]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-89064.rs
Rollup merge of #107116 - ozkanonur:consolidate-bootstrap-docs, r=jyn514
[rust.git] / tests / ui / suggestions / issue-89064.rs
1 use std::convert::TryInto;
2
3 trait A<T> {
4     fn foo() {}
5 }
6
7 trait B<T, U> {
8     fn bar() {}
9 }
10
11 struct S;
12
13 impl<T> A<T> for S {}
14 impl<T, U> B<T, U> for S {}
15
16 fn main() {
17     let _ = A::foo::<S>();
18     //~^ ERROR
19     //~| HELP remove these generics
20     //~| HELP consider moving this generic argument
21
22     let _ = B::bar::<S, S>();
23     //~^ ERROR
24     //~| HELP remove these generics
25     //~| HELP consider moving these generic arguments
26
27     let _ = A::<S>::foo::<S>();
28     //~^ ERROR
29     //~| HELP remove these generics
30
31     let _ = 42.into::<Option<_>>();
32     //~^ ERROR
33     //~| HELP remove these generics
34     //~| HELP consider moving this generic argument
35 }