added mcarton's test suggestion

This commit is contained in:
Andre Bogus 2016-05-31 21:50:13 +02:00 committed by mcarton
parent 46491443ff
commit 1b112f96b8

View file

@ -176,6 +176,11 @@ fn if_same_then_else() -> Result<&'static str, ()> {
None => 24, //~ERROR this `match` has identical arm bodies
};
let _ = match Some(42) {
Some(foo) => 24,
None => 24,
};
let _ = match Some(42) {
Some(42) => 24,
Some(a) => 24, // bindings are different