rust/tests/ui/methods/method-ambiguity-no-rcvr.rs
2023-11-12 19:59:13 +00:00

15 lines
186 B
Rust

struct Qux;
trait Foo {
fn foo();
}
trait FooBar {
fn foo() {}
}
fn main() {
Qux.foo();
//~^ ERROR no method named `foo` found for struct `Qux` in the current scope
}