]> git.lizzy.rs Git - rust.git/commitdiff
added mcarton's test suggestion
authorAndre Bogus <bogusandre@gmail.com>
Tue, 31 May 2016 19:50:13 +0000 (21:50 +0200)
committermcarton <cartonmartin+git@gmail.com>
Tue, 31 May 2016 21:30:49 +0000 (23:30 +0200)
tests/compile-fail/copies.rs

index 0f930657bf75343344ed364eac1ceb3368195678..f4e74eed4a414b21f74ec2aa4737ecf425619379 100644 (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