summaryrefslogtreecommitdiffstats
path: root/src/test/ui/variants/variant-used-as-type.rs
blob: f27db1024760ae3e51152f6b03d0adf6714cca84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test error message when enum variants are used as types


// issue 21225
enum Ty {
    A,
    B(Ty::A),
    //~^ ERROR expected type, found variant `Ty::A`
}


// issue 19197
enum E {
    A
}

impl E::A {}
//~^ ERROR expected type, found variant `E::A`

fn main() {}