rust/src/test/ui/issues/issue-23173.rs

18 lines
518 B
Rust
Raw Normal View History

enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
2017-11-22 11:40:52 -06:00
struct Struct {
a: usize,
}
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
}