From 1b112f96b8efe4ca0a0cf062fddc973c9845f810 Mon Sep 17 00:00:00 2001 From: Andre Bogus Date: Tue, 31 May 2016 21:50:13 +0200 Subject: [PATCH] added mcarton's test suggestion --- tests/compile-fail/copies.rs | 5 +++++ 1 file changed, 5 insertions(+) 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