summary refs log tree commit diff
path: root/src/test/ui/issues/issue-23173.rs
blob: 2922ebddf4c8a5aa9e97a70d08bd8b9e0a19817d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
struct Struct {
    a: usize,
}

fn use_token(token: &Token) { unimplemented!() }

fn main() {
    use_token(&Token::Homura);
    //~^ ERROR no variant named `Homura`
    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
}