Skip to content

Commit bdd83c2

Browse files
committed
err on all-but-B, not just on C
1 parent 538c538 commit bdd83c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/run-pass/enums.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ fn discriminant_overflow() {
4040
}
4141

4242
let x = Foo::B;
43-
if let Foo::C(_) = x {
44-
panic!();
43+
match x {
44+
Foo::B => {},
45+
_ => panic!(),
4546
}
4647
}
4748

0 commit comments

Comments
 (0)