summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-89064.rs
blob: fa5fc899dc083639119b384248a0dbcab088f0ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use std::convert::TryInto;

trait A<T> {
    fn foo() {}
}

trait B<T, U> {
    fn bar() {}
}

struct S;

impl<T> A<T> for S {}
impl<T, U> B<T, U> for S {}

fn main() {
    let _ = A::foo::<S>();
    //~^ ERROR
    //~| HELP remove these generics
    //~| HELP consider moving this generic argument

    let _ = B::bar::<S, S>();
    //~^ ERROR
    //~| HELP remove these generics
    //~| HELP consider moving these generic arguments

    let _ = A::<S>::foo::<S>();
    //~^ ERROR
    //~| HELP remove these generics

    let _ = 42.into::<Option<_>>();
    //~^ ERROR
    //~| HELP remove these generics
    //~| HELP consider moving this generic argument
}