2015-03-25 11:53:28 -05:00
|
|
|
struct Foo;
|
|
|
|
|
2015-04-24 23:58:40 -05:00
|
|
|
trait MyTrait {
|
2015-03-25 11:53:28 -05:00
|
|
|
fn trait_bar() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl MyTrait for Foo {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
match 0u32 {
|
|
|
|
<Foo as MyTrait>::trait_bar => {}
|
2019-10-14 19:20:50 -05:00
|
|
|
//~^ ERROR expected unit struct, unit variant or constant, found method `MyTrait::trait_bar`
|
2015-03-25 11:53:28 -05:00
|
|
|
}
|
|
|
|
}
|