1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:11:9
|
LL | let a @ b = U;
| ^ - - move occurs because value has type `U`, which does not implement the `Copy` trait
| | |
| | value moved here
| value used here after move
|
help: borrow this binding in the pattern to avoid moving the value
|
LL | let ref a @ ref b = U;
| +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:13:9
|
LL | let a @ (b, c) = (U, U);
| ^ - value partially moved here
| |
| 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 @ (b, ref c) = (U, U);
| +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:15:9
|
LL | let a @ (b, c) = (u(), u());
| ^ - value partially moved here
| |
| 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 @ (b, ref c) = (u(), u());
| +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:18:9
|
LL | a @ Ok(b) | a @ Err(b) => {}
| ^ - value partially moved here
| |
| 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 | ref a @ Ok(ref b) | a @ Err(b) => {}
| +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:18:21
|
LL | a @ Ok(b) | a @ Err(b) => {}
| ^ - value partially moved here
| |
| 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 | a @ Ok(b) | ref a @ Err(ref b) => {}
| +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:25:9
|
LL | xs @ [a, .., b] => {}
| ^^ - value partially moved here
| |
| 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 | ref xs @ [a, .., ref b] => {}
| +++ +++
error[E0382]: use of partially moved value
--> $DIR/borrowck-move-and-move.rs:29:9
|
LL | xs @ [_, ys @ .., _] => {}
| ^^ -- value partially moved here
| |
| 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 | ref xs @ [_, ref ys @ .., _] => {}
| +++ +++
error[E0382]: use of moved value
--> $DIR/borrowck-move-and-move.rs:22:12
|
LL | fn fun(a @ b: U) {}
| ^ - value moved here
| |
| value used here after move
| move occurs because value has type `U`, which does not implement the `Copy` trait
error: aborting due to 8 previous errors
For more information about this error, try `rustc --explain E0382`.
|