about summary refs log tree commit diff
path: root/tests/ui/methods/receiver-equality.rs
blob: 891435a425eb991d05a41ffba60c691a7fc23f50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Tests that we probe receivers invariantly when using path-based method lookup.

struct B<T>(T);

impl B<fn(&'static ())> {
    fn method(self) {
        println!("hey");
    }
}

fn foo(y: B<fn(&'static ())>) {
    B::<for<'a> fn(&'a ())>::method(y);
    //~^ ERROR no function or associated item named `method` found
}

fn main() {}