summaryrefslogtreecommitdiffstats
path: root/tests/rust/enum_discriminant.rs
blob: 79c270fd82ea27c5358062594a72458cebaa5dc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub const FOUR: i8 = 4;

#[repr(i8)]
enum E {
    A = 1,
    B = -1,
    C = 1 + 2,
    D = FOUR,
    F = (5),
    G = b'6' as i8,
    H = false as i8,
}

#[no_mangle]
pub extern "C" fn root(_: &E) {}