]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-item/associated-item-enum.rs
Rollup merge of #106823 - m-ou-se:format-args-as-str-guarantees, r=dtolnay
[rust.git] / tests / ui / associated-item / associated-item-enum.rs
1 enum Enum { Variant }
2
3 impl Enum {
4     const MISSPELLABLE: i32 = 0;
5     fn misspellable() {}
6 }
7
8 trait Trait {
9     fn misspellable_trait() {}
10 }
11
12 impl Trait for Enum {
13     fn misspellable_trait() {}
14 }
15
16 fn main() {
17     Enum::mispellable(); //~ ERROR no variant or associated item
18     Enum::mispellable_trait(); //~ ERROR no variant or associated item
19     Enum::MISPELLABLE; //~ ERROR no variant or associated item
20 }