2015-06-21 14:29:13 -05:00
|
|
|
enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
|
2017-11-22 11:40:52 -06:00
|
|
|
struct Struct {
|
|
|
|
a: usize,
|
|
|
|
}
|
2015-06-21 14:29:13 -05:00
|
|
|
|
|
|
|
fn use_token(token: &Token) { unimplemented!() }
|
|
|
|
|
|
|
|
fn main() {
|
2017-11-16 11:20:51 -06:00
|
|
|
use_token(&Token::Homura);
|
|
|
|
//~^ ERROR no variant named `Homura`
|
2017-11-22 11:40:52 -06:00
|
|
|
Struct::method();
|
|
|
|
//~^ ERROR no function or associated item named `method` found for type
|
|
|
|
Struct::method;
|
|
|
|
//~^ ERROR no function or associated item named `method` found for type
|
|
|
|
Struct::Assoc;
|
|
|
|
//~^ ERROR no associated item named `Assoc` found for type `Struct` in
|
2015-06-21 14:29:13 -05:00
|
|
|
}
|