rust/src/test/ui/methods/method-resolvable-path-in-pattern.rs

15 lines
253 B
Rust
Raw Normal View History

struct Foo;
trait MyTrait {
fn trait_bar() {}
}
impl MyTrait for Foo {}
fn main() {
match 0u32 {
<Foo as MyTrait>::trait_bar => {}
//~^ ERROR expected unit struct/variant or constant, found method `MyTrait::trait_bar`
}
}