mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
17 lines
337 B
Rust
17 lines
337 B
Rust
![]() |
// 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() {}
|