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 => {}
|
2016-09-14 16:51:46 -05:00
|
|
|
//~^ ERROR expected unit struct/variant or constant, found method `MyTrait::trait_bar`
|
2015-03-25 11:53:28 -05:00
|
|
|
}
|
|
|
|
}
|