]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/signed_enum_discr.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / consts / signed_enum_discr.rs
1 // run-pass
2
3 // https://github.com/rust-lang/rust/issues/49181
4
5 #[derive(Eq, PartialEq)]
6 #[repr(i8)]
7 pub enum A {
8     B = -1,
9     C = 1,
10 }
11
12 pub const D: A = A::B;
13
14 fn main() {
15     match A::C {
16         D => {},
17         _ => {}
18     }
19 }