rust/tests/ui/associated-item/associated-item-enum.rs

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

21 lines
413 B
Rust
Raw Normal View History

2019-04-08 16:58:18 -05:00
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
}