|  | 
|  | 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) | 
|  | 11 | + | 
|  | 12 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 13 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 | 
|  | 14 | +   | | 
|  | 15 | +LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | 
|  | 16 | +   |                 --------- in this derive macro expansion | 
|  | 17 | +LL | struct StructA(String); | 
|  | 18 | +   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 19 | +   | | 
|  | 20 | +   = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour | 
|  | 21 | +   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  | 22 | + | 
|  | 23 | +error[E0507]: cannot move out of `other` which is behind a shared reference | 
|  | 24 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 | 
|  | 25 | +   | | 
|  | 26 | +LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | 
|  | 27 | +   |                 --------- in this derive macro expansion | 
|  | 28 | +LL | struct StructA(String); | 
|  | 29 | +   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait | 
|  | 30 | +   | | 
|  | 31 | +   = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour | 
|  | 32 | +   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  | 33 | + | 
|  | 34 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 35 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 | 
|  | 36 | +   | | 
|  | 37 | +LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | 
|  | 38 | +   |                                ---------- in this derive macro expansion | 
|  | 39 | +LL | struct StructA(String); | 
|  | 40 | +   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 41 | +   | | 
|  | 42 | +   = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour | 
|  | 43 | +   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  | 44 | + | 
|  | 45 | +error[E0507]: cannot move out of `other` which is behind a shared reference | 
|  | 46 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 | 
|  | 47 | +   | | 
|  | 48 | +LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | 
|  | 49 | +   |                                ---------- in this derive macro expansion | 
|  | 50 | +LL | struct StructA(String); | 
|  | 51 | +   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait | 
|  | 52 | +   | | 
|  | 53 | +   = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour | 
|  | 54 | +   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  | 55 | + | 
|  | 56 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 57 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 | 
|  | 58 | +   | | 
|  | 59 | +LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | 
|  | 60 | +   |                                            --- in this derive macro expansion | 
|  | 61 | +LL | struct StructA(String); | 
|  | 62 | +   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 63 | +   | | 
|  | 64 | +   = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour | 
|  | 65 | +   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  | 66 | + | 
|  | 67 | +error[E0507]: cannot move out of `other` which is behind a shared reference | 
|  | 68 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 | 
|  | 69 | +   | | 
|  | 70 | +LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | 
|  | 71 | +   |                                            --- in this derive macro expansion | 
|  | 72 | +LL | struct StructA(String); | 
|  | 73 | +   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait | 
|  | 74 | +   | | 
|  | 75 | +   = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour | 
|  | 76 | +   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  | 77 | + | 
|  | 78 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 79 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 | 
|  | 80 | +   | | 
|  | 81 | +LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | 
|  | 82 | +   |                                                 ---- in this derive macro expansion | 
|  | 83 | +LL | struct StructA(String); | 
|  | 84 | +   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 85 | +   | | 
|  | 86 | +   = note: `#[derive(Hash)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour | 
|  | 87 | +   = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  | 88 | + | 
|  | 89 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 90 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16 | 
|  | 91 | +   | | 
|  | 92 | +LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | 
|  | 93 | +   |                                                       ----- in this derive macro expansion | 
|  | 94 | +LL | struct StructA(String); | 
|  | 95 | +   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 96 | +   | | 
|  | 97 | +   = note: `#[derive(Clone)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour | 
|  | 98 | +   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  | 99 | + | 
|  | 100 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 101 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:28:9 | 
|  | 102 | +   | | 
|  | 103 | +LL |         self.0 | 
|  | 104 | +   |         ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 105 | + | 
|  | 106 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 107 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:38:20 | 
|  | 108 | +   | | 
|  | 109 | +LL |         let x = &{ self.0 }; | 
|  | 110 | +   |                    ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 111 | + | 
|  | 112 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 113 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:45:12 | 
|  | 114 | +   | | 
|  | 115 | +LL |         ({ self.0 }) == ({ other.0 }) | 
|  | 116 | +   |            ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 117 | + | 
|  | 118 | +error[E0507]: cannot move out of `other` which is behind a shared reference | 
|  | 119 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:45:28 | 
|  | 120 | +   | | 
|  | 121 | +LL |         ({ self.0 }) == ({ other.0 }) | 
|  | 122 | +   |                            ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait | 
|  | 123 | + | 
|  | 124 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 125 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:53:36 | 
|  | 126 | +   | | 
|  | 127 | +LL |         PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 }) | 
|  | 128 | +   |                                    ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 129 | + | 
|  | 130 | +error[E0507]: cannot move out of `other` which is behind a shared reference | 
|  | 131 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:53:49 | 
|  | 132 | +   | | 
|  | 133 | +LL |         PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 }) | 
|  | 134 | +   |                                                 ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait | 
|  | 135 | + | 
|  | 136 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 137 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:68:20 | 
|  | 138 | +   | | 
|  | 139 | +LL |         let x = &{ self.0 }; | 
|  | 140 | +   |                    ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 141 | + | 
|  | 142 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 143 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:75:12 | 
|  | 144 | +   | | 
|  | 145 | +LL |         ({ self.0 }) == ({ other.0 }) | 
|  | 146 | +   |            ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 147 | + | 
|  | 148 | +error[E0507]: cannot move out of `other` which is behind a shared reference | 
|  | 149 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:75:28 | 
|  | 150 | +   | | 
|  | 151 | +LL |         ({ self.0 }) == ({ other.0 }) | 
|  | 152 | +   |                            ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait | 
|  | 153 | + | 
|  | 154 | +error[E0507]: cannot move out of `self` which is behind a shared reference | 
|  | 155 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:83:36 | 
|  | 156 | +   | | 
|  | 157 | +LL |         PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 }) | 
|  | 158 | +   |                                    ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | 
|  | 159 | + | 
|  | 160 | +error[E0507]: cannot move out of `other` which is behind a shared reference | 
|  | 161 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:83:49 | 
|  | 162 | +   | | 
|  | 163 | +LL |         PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 }) | 
|  | 164 | +   |                                                 ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait | 
|  | 165 | + | 
|  | 166 | +error[E0507]: cannot move out of `arg` which is behind a shared reference | 
|  | 167 | +  --> $DIR/deriving-with-repr-packed-move-errors.rs:92:5 | 
|  | 168 | +   | | 
|  | 169 | +LL |     arg.0 | 
|  | 170 | +   |     ^^^^^ move occurs because `arg.0` has type `String`, which does not implement the `Copy` trait | 
|  | 171 | + | 
|  | 172 | +error: aborting due to 21 previous errors | 
|  | 173 | + | 
|  | 174 | +For more information about this error, try `rustc --explain E0507`. | 
0 commit comments