2015-06-21 19:29:13 +00:00
|
|
|
enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
|
2017-11-22 17:40:52 +00:00
|
|
|
struct Struct {
|
|
|
|
a: usize,
|
|
|
|
}
|
2015-06-21 19:29:13 +00:00
|
|
|
|
|
|
|
fn use_token(token: &Token) { unimplemented!() }
|
|
|
|
|
|
|
|
fn main() {
|
2019-04-08 21:58:18 +00:00
|
|
|
use_token(&Token::Homura); //~ ERROR no variant or associated item named `Homura`
|
2020-01-08 16:05:31 +00:00
|
|
|
Struct::method(); //~ ERROR no function or associated item named `method` found
|
|
|
|
Struct::method; //~ ERROR no function or associated item named `method` found
|
|
|
|
Struct::Assoc; //~ ERROR no associated item named `Assoc` found
|
2015-06-21 19:29:13 +00:00
|
|
|
}
|