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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
251 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 => {}
2020-03-04 21:03:15 -06:00
//~^ ERROR expected unit struct, unit variant or constant, found associated function
}
}