rust/src/test/ui/methods/method-resolvable-path-in-pattern.rs
2020-03-12 15:47:36 -05:00

14 lines
251 B
Rust

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