summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/signed_enum_discr.rs
blob: 2e4395ccf2277a7faee3c83e757c9e70f79942f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// run-pass

// https://github.com/rust-lang/rust/issues/49181

#[derive(Eq, PartialEq)]
#[repr(i8)]
pub enum A {
    B = -1,
    C = 1,
}

pub const D: A = A::B;

fn main() {
    match A::C {
        D => {},
        _ => {}
    }
}