Fix issue 90038

This commit is contained in:
Gary Guo 2021-10-19 06:42:44 +01:00
parent cd8b56f528
commit 7dbd5bb0bd
2 changed files with 22 additions and 1 deletions

View file

@ -0,0 +1,21 @@
// run-pass
#[repr(u32)]
pub enum Foo {
// Greater than or equal to 2
A = 2,
}
pub enum Bar {
A(Foo),
// More than two const variants
B,
C,
}
fn main() {
match Bar::A(Foo::A) {
Bar::A(_) => (),
_ => unreachable!(),
}
}