1 2 3 4 5 6 7 8 9 10 11 12 13 14
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 } }