diff --git a/tests/run-pass/enums.rs b/tests/run-pass/enums.rs index 73172d6bbd2..dab3e873668 100644 --- a/tests/run-pass/enums.rs +++ b/tests/run-pass/enums.rs @@ -40,8 +40,9 @@ fn discriminant_overflow() { } let x = Foo::B; - if let Foo::C(_) = x { - panic!(); + match x { + Foo::B => {}, + _ => panic!(), } }