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() {
|
2019-04-08 16:58:18 -05:00
|
|
|
use_token(&Token::Homura); //~ ERROR no variant or associated item named `Homura`
|
2020-01-08 10:05:31 -06: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 14:29:13 -05:00
|
|
|
}
|