rust/src/test/ui/issues/issue-29124.rs
2018-12-25 21:08:33 -07:00

20 lines
346 B
Rust

struct Ret;
struct Obj;
impl Obj {
fn func() -> Ret {
Ret
}
}
fn func() -> Ret {
Ret
}
fn main() {
Obj::func.x();
//~^ ERROR no method named `x` found for type `fn() -> Ret {Obj::func}` in the current scope
func.x();
//~^ ERROR no method named `x` found for type `fn() -> Ret {func}` in the current scope
}