fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1error[E0507]: cannot move out of `*a` which is behind a shared reference 2 --> $DIR/move-errors.rs:6:13 3 | 4LL | let b = *a; 5 | ^^ 6 | | 7 | move occurs because `*a` has type `A`, which does not implement the `Copy` trait 8 | help: consider borrowing here: `&*a` 9 10error[E0508]: cannot move out of type `[A; 1]`, a non-copy array 11 --> $DIR/move-errors.rs:12:13 12 | 13LL | let b = a[0]; 14 | ^^^^ 15 | | 16 | cannot move out of here 17 | move occurs because `a[_]` has type `A`, which does not implement the `Copy` trait 18 | help: consider borrowing here: `&a[0]` 19 20error[E0507]: cannot move out of `**r` which is behind a shared reference 21 --> $DIR/move-errors.rs:19:13 22 | 23LL | let s = **r; 24 | ^^^ 25 | | 26 | move occurs because `**r` has type `A`, which does not implement the `Copy` trait 27 | help: consider borrowing here: `&**r` 28 29error[E0507]: cannot move out of an `Rc` 30 --> $DIR/move-errors.rs:27:13 31 | 32LL | let s = *r; 33 | ^^ 34 | | 35 | move occurs because value has type `A`, which does not implement the `Copy` trait 36 | help: consider borrowing here: `&*r` 37 38error[E0508]: cannot move out of type `[A; 1]`, a non-copy array 39 --> $DIR/move-errors.rs:32:13 40 | 41LL | let a = [A("".to_string())][0]; 42 | ^^^^^^^^^^^^^^^^^^^^^^ 43 | | 44 | cannot move out of here 45 | move occurs because value has type `A`, which does not implement the `Copy` trait 46 | help: consider borrowing here: `&[A("".to_string())][0]` 47 48error[E0507]: cannot move out of `a.0` which is behind a shared reference 49 --> $DIR/move-errors.rs:38:16 50 | 51LL | let A(s) = *a; 52 | - ^^ help: consider borrowing here: `&*a` 53 | | 54 | data moved here 55 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait 56 57error[E0509]: cannot move out of type `D`, which implements the `Drop` trait 58 --> $DIR/move-errors.rs:44:19 59 | 60LL | let C(D(s)) = c; 61 | - ^ cannot move out of here 62 | | 63 | data moved here 64 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait 65 66error[E0507]: cannot move out of `*a` which is behind a shared reference 67 --> $DIR/move-errors.rs:51:9 68 | 69LL | b = *a; 70 | ^^ move occurs because `*a` has type `A`, which does not implement the `Copy` trait 71 72error[E0508]: cannot move out of type `[B; 1]`, a non-copy array 73 --> $DIR/move-errors.rs:74:11 74 | 75LL | match x[0] { 76 | ^^^^ 77 | | 78 | cannot move out of here 79 | help: consider borrowing here: `&x[0]` 80LL | 81LL | B::U(d) => (), 82 | - data moved here 83LL | B::V(s) => (), 84 | - ...and here 85 | 86note: move occurs because these variables have types that don't implement the `Copy` trait 87 --> $DIR/move-errors.rs:76:14 88 | 89LL | B::U(d) => (), 90 | ^ 91LL | B::V(s) => (), 92 | ^ 93 94error[E0509]: cannot move out of type `D`, which implements the `Drop` trait 95 --> $DIR/move-errors.rs:83:11 96 | 97LL | match x { 98 | ^ cannot move out of here 99... 100LL | B::U(D(s)) => (), 101 | - 102 | | 103 | data moved here 104 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait 105 106error[E0509]: cannot move out of type `D`, which implements the `Drop` trait 107 --> $DIR/move-errors.rs:92:11 108 | 109LL | match x { 110 | ^ cannot move out of here 111... 112LL | (D(s), &t) => (), 113 | - 114 | | 115 | data moved here 116 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait 117 118error[E0507]: cannot move out of `*x.1` which is behind a shared reference 119 --> $DIR/move-errors.rs:92:11 120 | 121LL | match x { 122 | ^ 123... 124LL | (D(s), &t) => (), 125 | - 126 | | 127 | data moved here 128 | move occurs because `t` has type `std::string::String`, which does not implement the `Copy` trait 129 130error[E0509]: cannot move out of type `F`, which implements the `Drop` trait 131 --> $DIR/move-errors.rs:102:11 132 | 133LL | match x { 134 | ^ cannot move out of here 135LL | 136LL | F(s, mut t) => (), 137 | - ----- ...and here 138 | | 139 | data moved here 140 | 141note: move occurs because these variables have types that don't implement the `Copy` trait 142 --> $DIR/move-errors.rs:104:11 143 | 144LL | F(s, mut t) => (), 145 | ^ ^^^^^ 146 147error[E0507]: cannot move out of `x.0` which is behind a shared reference 148 --> $DIR/move-errors.rs:110:11 149 | 150LL | match *x { 151 | ^^ help: consider borrowing here: `&*x` 152LL | 153LL | Ok(s) | Err(s) => (), 154 | - 155 | | 156 | data moved here 157 | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait 158 159error: aborting due to 14 previous errors 160 161Some errors have detailed explanations: E0507, E0508, E0509. 162For more information about an error, try `rustc --explain E0507`.