about summary refs log tree commit diff
path: root/tests/ui/suggestions/suggest-assoc-fn-call-for-impl-trait.fixed
blob: b4d7c6054faee1de6efb275e4e3f86c88f85dd35 (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
//@ run-rustfix

struct A {

}

trait M {
    fn foo(_a: Self);
    fn bar(_a: Self);
    fn baz(_a: i32);
}

impl M for A {
    fn foo(_a: Self) {}
    fn bar(_a: A) {}
    fn baz(_a: i32) {}
}

fn main() {
    let _a = A {};
    A::foo(_a);
    //~^ ERROR no method named `foo` found
    A::baz(0);
    //~^ ERROR no method named `baz` found

    let _b = A {};
    A::bar(_b);
    //~^ ERROR no method named `bar` found
}