Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 1 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 2 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 3 | | |
| 4 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 5 | | ----- in this derive macro expansion |
| 6 | LL | struct StructA(String); |
| 7 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
| 8 | | |
| 9 | = note: `#[derive(Debug)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 10 | = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 11 | help: consider cloning the value if the performance cost is acceptable |
| 12 | | |
| 13 | LL | struct StructA(String.clone()); |
| 14 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 15 | |
| 16 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 17 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 18 | | |
| 19 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 20 | | --------- in this derive macro expansion |
| 21 | LL | struct StructA(String); |
| 22 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
| 23 | | |
| 24 | = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 25 | = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 26 | help: consider cloning the value if the performance cost is acceptable |
| 27 | | |
| 28 | LL | struct StructA(String.clone()); |
| 29 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 30 | |
| 31 | error[E0507]: cannot move out of `other` which is behind a shared reference |
| 32 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 33 | | |
| 34 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 35 | | --------- in this derive macro expansion |
| 36 | LL | struct StructA(String); |
| 37 | | ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait |
| 38 | | |
| 39 | = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 40 | = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 41 | help: consider cloning the value if the performance cost is acceptable |
| 42 | | |
| 43 | LL | struct StructA(String.clone()); |
| 44 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 45 | |
| 46 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 47 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 48 | | |
| 49 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 50 | | ---------- in this derive macro expansion |
| 51 | LL | struct StructA(String); |
| 52 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
| 53 | | |
| 54 | = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 55 | = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 56 | help: consider cloning the value if the performance cost is acceptable |
| 57 | | |
| 58 | LL | struct StructA(String.clone()); |
| 59 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 60 | |
| 61 | error[E0507]: cannot move out of `other` which is behind a shared reference |
| 62 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 63 | | |
| 64 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 65 | | ---------- in this derive macro expansion |
| 66 | LL | struct StructA(String); |
| 67 | | ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait |
| 68 | | |
| 69 | = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 70 | = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 71 | help: consider cloning the value if the performance cost is acceptable |
| 72 | | |
| 73 | LL | struct StructA(String.clone()); |
| 74 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 75 | |
| 76 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 77 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 78 | | |
| 79 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 80 | | --- in this derive macro expansion |
| 81 | LL | struct StructA(String); |
| 82 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
| 83 | | |
| 84 | = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 85 | = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 86 | help: consider cloning the value if the performance cost is acceptable |
| 87 | | |
| 88 | LL | struct StructA(String.clone()); |
| 89 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 90 | |
| 91 | error[E0507]: cannot move out of `other` which is behind a shared reference |
| 92 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 93 | | |
| 94 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 95 | | --- in this derive macro expansion |
| 96 | LL | struct StructA(String); |
| 97 | | ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait |
| 98 | | |
| 99 | = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 100 | = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 101 | help: consider cloning the value if the performance cost is acceptable |
| 102 | | |
| 103 | LL | struct StructA(String.clone()); |
| 104 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 105 | |
| 106 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 107 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 108 | | |
| 109 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 110 | | ---- in this derive macro expansion |
| 111 | LL | struct StructA(String); |
| 112 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
| 113 | | |
| 114 | = note: `#[derive(Hash)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 115 | = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 116 | help: consider cloning the value if the performance cost is acceptable |
| 117 | | |
| 118 | LL | struct StructA(String.clone()); |
| 119 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 120 | |
| 121 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 122 | --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 |
| 123 | | |
| 124 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] |
| 125 | | ----- in this derive macro expansion |
| 126 | LL | struct StructA(String); |
| 127 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
| 128 | | |
| 129 | = note: `#[derive(Clone)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour |
| 130 | = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 131 | help: consider cloning the value if the performance cost is acceptable |
| 132 | | |
| 133 | LL | struct StructA(String.clone()); |
| 134 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 135 | |
| 136 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 137 | --> $DIR/deriving-with-repr-packed-move-errors.rs:28:9 |
| 138 | | |
| 139 | LL | self.0 |
| 140 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 141 | | |
| 142 | help: consider cloning the value if the performance cost is acceptable |
| 143 | | |
| 144 | LL | self.0.clone() |
| 145 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 146 | |
| 147 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 148 | --> $DIR/deriving-with-repr-packed-move-errors.rs:38:20 |
| 149 | | |
| 150 | LL | let x = &{ self.0 }; |
| 151 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 152 | | |
| 153 | help: consider cloning the value if the performance cost is acceptable |
| 154 | | |
| 155 | LL | let x = &{ self.0.clone() }; |
| 156 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 157 | |
| 158 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 159 | --> $DIR/deriving-with-repr-packed-move-errors.rs:45:12 |
| 160 | | |
| 161 | LL | ({ self.0 }) == ({ other.0 }) |
| 162 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 163 | | |
| 164 | help: consider cloning the value if the performance cost is acceptable |
| 165 | | |
| 166 | LL | ({ self.0.clone() }) == ({ other.0 }) |
| 167 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 168 | |
| 169 | error[E0507]: cannot move out of `other` which is behind a shared reference |
| 170 | --> $DIR/deriving-with-repr-packed-move-errors.rs:45:28 |
| 171 | | |
| 172 | LL | ({ self.0 }) == ({ other.0 }) |
| 173 | | ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 174 | | |
| 175 | help: consider cloning the value if the performance cost is acceptable |
| 176 | | |
| 177 | LL | ({ self.0 }) == ({ other.0.clone() }) |
| 178 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 179 | |
| 180 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 181 | --> $DIR/deriving-with-repr-packed-move-errors.rs:53:36 |
| 182 | | |
| 183 | LL | PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 }) |
| 184 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 185 | | |
| 186 | help: consider cloning the value if the performance cost is acceptable |
| 187 | | |
| 188 | LL | PartialOrd::partial_cmp(&{ self.0.clone() }, &{ other.0 }) |
| 189 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 190 | |
| 191 | error[E0507]: cannot move out of `other` which is behind a shared reference |
| 192 | --> $DIR/deriving-with-repr-packed-move-errors.rs:53:49 |
| 193 | | |
| 194 | LL | PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 }) |
| 195 | | ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 196 | | |
| 197 | help: consider cloning the value if the performance cost is acceptable |
| 198 | | |
| 199 | LL | PartialOrd::partial_cmp(&{ self.0 }, &{ other.0.clone() }) |
| 200 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 201 | |
| 202 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 203 | --> $DIR/deriving-with-repr-packed-move-errors.rs:68:20 |
| 204 | | |
| 205 | LL | let x = &{ self.0 }; |
| 206 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 207 | | |
| 208 | help: consider cloning the value if the performance cost is acceptable |
| 209 | | |
| 210 | LL | let x = &{ self.0.clone() }; |
| 211 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 212 | |
| 213 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 214 | --> $DIR/deriving-with-repr-packed-move-errors.rs:75:12 |
| 215 | | |
| 216 | LL | ({ self.0 }) == ({ other.0 }) |
| 217 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 218 | | |
| 219 | help: consider cloning the value if the performance cost is acceptable |
| 220 | | |
| 221 | LL | ({ self.0.clone() }) == ({ other.0 }) |
| 222 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 223 | |
| 224 | error[E0507]: cannot move out of `other` which is behind a shared reference |
| 225 | --> $DIR/deriving-with-repr-packed-move-errors.rs:75:28 |
| 226 | | |
| 227 | LL | ({ self.0 }) == ({ other.0 }) |
| 228 | | ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 229 | | |
| 230 | help: consider cloning the value if the performance cost is acceptable |
| 231 | | |
| 232 | LL | ({ self.0 }) == ({ other.0.clone() }) |
| 233 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 234 | |
| 235 | error[E0507]: cannot move out of `self` which is behind a shared reference |
| 236 | --> $DIR/deriving-with-repr-packed-move-errors.rs:83:36 |
| 237 | | |
| 238 | LL | PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 }) |
| 239 | | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 240 | | |
| 241 | help: consider cloning the value if the performance cost is acceptable |
| 242 | | |
| 243 | LL | PartialOrd::partial_cmp(&{ self.0.clone() }, &{ other.0 }) |
| 244 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 245 | |
| 246 | error[E0507]: cannot move out of `other` which is behind a shared reference |
| 247 | --> $DIR/deriving-with-repr-packed-move-errors.rs:83:49 |
| 248 | | |
| 249 | LL | PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 }) |
| 250 | | ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 251 | | |
| 252 | help: consider cloning the value if the performance cost is acceptable |
| 253 | | |
| 254 | LL | PartialOrd::partial_cmp(&{ self.0 }, &{ other.0.clone() }) |
| 255 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 256 | |
| 257 | error[E0507]: cannot move out of `arg` which is behind a shared reference |
| 258 | --> $DIR/deriving-with-repr-packed-move-errors.rs:92:5 |
| 259 | | |
| 260 | LL | arg.0 |
| 261 | | ^^^^^ move occurs because `arg.0` has type `String`, which does not implement the `Copy` trait |
Esteban Küber | 10c2fbe | 2024-03-13 03:41:41 | [diff] [blame] | 262 | | |
| 263 | help: consider cloning the value if the performance cost is acceptable |
| 264 | | |
| 265 | LL | arg.0.clone() |
| 266 | | ++++++++ |
Gurinder Singh | 4b3ece4 | 2023-11-03 02:02:10 | [diff] [blame] | 267 | |
| 268 | error: aborting due to 21 previous errors |
| 269 | |
| 270 | For more information about this error, try `rustc --explain E0507`. |