summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-23173.rs
blob: 92f4c546440ab7f053ac3e73a19dc2de676ad419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 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
}