diff --git a/tests/compile-fail/copies.rs b/tests/compile-fail/copies.rs index 0f930657bf75..f4e74eed4a41 100644 --- a/tests/compile-fail/copies.rs +++ b/tests/compile-fail/copies.rs @@ -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