err on all-but-B, not just on C

This commit is contained in:
Ralf Jung 2019-08-10 18:38:41 +02:00
parent 7e65c44714
commit d53d7f77a0

View File

@ -40,8 +40,9 @@ fn discriminant_overflow() {
} }
let x = Foo::B; let x = Foo::B;
if let Foo::C(_) = x { match x {
panic!(); Foo::B => {},
_ => panic!(),
} }
} }