]> git.lizzy.rs Git - rust.git/commitdiff
enhance borrowck-pat-by-copy-bindings-in-at
authorMazdak Farrokhzad <twingoow@gmail.com>
Sun, 15 Dec 2019 03:12:35 +0000 (04:12 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Mon, 23 Dec 2019 13:47:20 +0000 (14:47 +0100)
src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs

index f1dc5dbd12a37d6efaa3caf69c7f52c66268e216..f88286916bc8d9dd4aa5c6080b2320592d30577d 100644 (file)
@@ -43,4 +43,11 @@ fn main() {
             drop(a);
         }
     }
+
+    match Ok(mk_c()) {
+        Ok(ref a @ b) | Err(b @ ref a) => {
+            let _: &C = a;
+            let _: C = b;
+        }
+    }
 }