Importing rustc-1.43.0
Bug: 154947284
Change-Id: If0fb270e52b73940349534cf2d7b1b76ba095363
diff --git a/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.rs b/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.rs
new file mode 100644
index 0000000..5c51c47
--- /dev/null
+++ b/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.rs
@@ -0,0 +1,16 @@
+#![feature(move_ref_pattern)]
+
+fn main() {
+ struct U;
+
+ // A tuple is a "non-reference pattern".
+ // A `mut` binding pattern resets the binding mode to by-value.
+
+ let p = (U, U);
+ let (a, mut b) = &p;
+ //~^ ERROR cannot move out of a shared reference
+
+ let mut p = (U, U);
+ let (a, mut b) = &mut p;
+ //~^ ERROR cannot move out of a mutable reference
+}