summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr')
-rw-r--r--src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr148
1 files changed, 148 insertions, 0 deletions
diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
index a9e66de08..389e86e64 100644
--- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
+++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
@@ -7,6 +7,11 @@ LL | let a @ ref b = U;
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ ref b = U;
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9
@@ -18,6 +23,11 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ (mut b @ ref mut c, d @ ref e) = (U, U);
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:14
@@ -28,6 +38,11 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let a @ (ref mut b @ ref mut c, d @ ref e) = (U, U);
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:33
@@ -38,6 +53,11 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let a @ (mut b @ ref mut c, ref d @ ref e) = (U, U);
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:29:9
@@ -49,6 +69,11 @@ LL | let a @ [ref mut b, ref c] = [U, U];
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ [ref mut b, ref c] = [U, U];
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:9
@@ -59,6 +84,11 @@ LL | let a @ ref b = u();
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ ref b = u();
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9
@@ -70,6 +100,11 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:14
@@ -80,6 +115,11 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let a @ (ref mut b @ ref mut c, d @ ref e) = (u(), u());
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:33
@@ -90,6 +130,11 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let a @ (mut b @ ref mut c, ref d @ ref e) = (u(), u());
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:9
@@ -101,6 +146,11 @@ LL | let a @ [ref mut b, ref c] = [u(), u()];
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ [ref mut b, ref c] = [u(), u()];
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:42:9
@@ -111,6 +161,11 @@ LL | a @ Some(ref b) => {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref a @ Some(ref b) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:9
@@ -122,6 +177,11 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:19
@@ -132,6 +192,11 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38
@@ -142,6 +207,11 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:9
@@ -153,6 +223,11 @@ LL | mut a @ Some([ref b, ref mut c]) => {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref mut a @ Some([ref b, ref mut c]) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:9
@@ -163,6 +238,11 @@ LL | a @ Some(ref b) => {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref a @ Some(ref b) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:9
@@ -174,6 +254,11 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:19
@@ -184,6 +269,11 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38
@@ -194,6 +284,11 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:9
@@ -205,6 +300,11 @@ LL | mut a @ Some([ref b, ref mut c]) => {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref mut a @ Some([ref b, ref mut c]) => {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:11:11
@@ -215,6 +315,11 @@ LL | fn f1(a @ ref b: U) {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | fn f1(ref a @ ref b: U) {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
@@ -226,6 +331,11 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | fn f2(ref mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:20
@@ -236,6 +346,11 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
| | value borrowed here after move
| value moved into `b` here
| move occurs because `b` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | fn f2(mut a @ (ref b @ ref c, mut d @ ref e): (U, U)) {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:31
@@ -246,6 +361,11 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
| | value borrowed here after move
| value moved into `d` here
| move occurs because `d` has type `U` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | fn f2(mut a @ (b @ ref c, ref mut d @ ref e): (U, U)) {}
+ | +++
error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:19:11
@@ -257,6 +377,11 @@ LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {}
| | value borrowed here after move
| value moved into `a` here
| move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | fn f3(ref a @ [ref mut b, ref c]: [U; 2]) {}
+ | +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9
@@ -267,6 +392,10 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U);
| value used here after partial move
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ (mut b @ ref mut c, ref d @ ref e) = (U, U);
+ | +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9
@@ -277,6 +406,10 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u());
| value used here after partial move
|
= note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | let ref a @ (mut b @ ref mut c, ref d @ ref e) = (u(), u());
+ | +++ +++
error[E0382]: use of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38
@@ -285,6 +418,11 @@ LL | match Some((U, U)) {
| ------------ move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| - value moved here ^ value used here after move
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
+ | +++
error[E0382]: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:30
@@ -305,6 +443,11 @@ LL | a @ Some(ref b) => {}
| - ^^^^^ value borrowed here after move
| |
| value moved here
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref a @ Some(ref b) => {}
+ | +++
error[E0382]: use of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38
@@ -313,6 +456,11 @@ LL | match Some((u(), u())) {
| ---------------- move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait
LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
| - value moved here ^ value used here after move
+ |
+help: borrow this binding in the pattern to avoid moving the value
+ |
+LL | ref a @ Some((mut b @ ref mut c, d @ ref e)) => {}
+ | +++
error[E0382]: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:30