about summary refs log tree commit diff
path: root/tests/ui/enum/assoc-fn-call-on-variant.rs
blob: 7fa8eb2da41acbca41cb68f4ffde85ad933d6903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[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
}