rust/tests/ui/enum/assoc-fn-call-on-variant.rs

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

16 lines
188 B
Rust
Raw Normal View History

#[derive(Default)]
enum E {
A {},
B {},
#[default]
C,
}
impl E {
fn f() {}
}
fn main() {
E::A::f(); //~ ERROR failed to resolve: `A` is a variant, not a module
}