From 48f2766522283f20aed612d51dacfb83760b75f0 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 15 Dec 2019 04:12:35 +0100 Subject: [PATCH] enhance borrowck-pat-by-copy-bindings-in-at --- .../borrowck-pat-by-copy-bindings-in-at.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs index f1dc5dbd12a..f88286916bc 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs @@ -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; + } + } }