summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-item/associated-item-enum.rs
blob: 30ba258155bb9cef28ff2a5c759d2833166fb251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
enum Enum { Variant }

impl Enum {
    const MISSPELLABLE: i32 = 0;
    fn misspellable() {}
}

trait Trait {
    fn misspellable_trait() {}
}

impl Trait for Enum {
    fn misspellable_trait() {}
}

fn main() {
    Enum::mispellable(); //~ ERROR no variant or associated item
    Enum::mispellable_trait(); //~ ERROR no variant or associated item
    Enum::MISPELLABLE; //~ ERROR no variant or associated item
}