rust/tests/ui/issues/issue-23173.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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