| 
1 |  | -error[E0507]: cannot move out of `self` which is behind a shared reference  | 
 | 1 | +error[E0507]: cannot move out of a shared reference  | 
2 | 2 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
3 | 3 |    |  | 
4 | 4 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
5 | 5 |    |          ----- in this derive macro expansion  | 
6 | 6 | LL | struct StructA(String);  | 
7 |  | -   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait  | 
 | 7 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
8 | 8 |    |  | 
9 | 9 |    = note: `#[derive(Debug)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
10 | 10 | help: consider cloning the value if the performance cost is acceptable  | 
11 | 11 |    |  | 
12 | 12 | LL | struct StructA(String.clone());  | 
13 | 13 |    |                      ++++++++  | 
14 | 14 | 
 
  | 
15 |  | -error[E0507]: cannot move out of `self` which is behind a shared reference  | 
 | 15 | +error[E0507]: cannot move out of a shared reference  | 
16 | 16 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
17 | 17 |    |  | 
18 | 18 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
19 | 19 |    |                 --------- in this derive macro expansion  | 
20 | 20 | LL | struct StructA(String);  | 
21 |  | -   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait  | 
 | 21 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
22 | 22 |    |  | 
23 | 23 |    = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
24 | 24 | help: consider cloning the value if the performance cost is acceptable  | 
25 | 25 |    |  | 
26 | 26 | LL | struct StructA(String.clone());  | 
27 | 27 |    |                      ++++++++  | 
28 | 28 | 
 
  | 
29 |  | -error[E0507]: cannot move out of `other` which is behind a shared reference  | 
 | 29 | +error[E0507]: cannot move out of a shared reference  | 
30 | 30 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
31 | 31 |    |  | 
32 | 32 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
33 | 33 |    |                 --------- in this derive macro expansion  | 
34 | 34 | LL | struct StructA(String);  | 
35 |  | -   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait  | 
 | 35 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
36 | 36 |    |  | 
37 | 37 |    = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
 | 38 | +   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`  | 
38 | 39 | help: consider cloning the value if the performance cost is acceptable  | 
39 | 40 |    |  | 
40 | 41 | LL | struct StructA(String.clone());  | 
41 | 42 |    |                      ++++++++  | 
42 | 43 | 
 
  | 
43 |  | -error[E0507]: cannot move out of `self` which is behind a shared reference  | 
 | 44 | +error[E0507]: cannot move out of a shared reference  | 
44 | 45 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
45 | 46 |    |  | 
46 | 47 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
47 | 48 |    |                                ---------- in this derive macro expansion  | 
48 | 49 | LL | struct StructA(String);  | 
49 |  | -   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait  | 
 | 50 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
50 | 51 |    |  | 
51 | 52 |    = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
52 | 53 | help: consider cloning the value if the performance cost is acceptable  | 
53 | 54 |    |  | 
54 | 55 | LL | struct StructA(String.clone());  | 
55 | 56 |    |                      ++++++++  | 
56 | 57 | 
 
  | 
57 |  | -error[E0507]: cannot move out of `other` which is behind a shared reference  | 
 | 58 | +error[E0507]: cannot move out of a shared reference  | 
58 | 59 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
59 | 60 |    |  | 
60 | 61 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
61 | 62 |    |                                ---------- in this derive macro expansion  | 
62 | 63 | LL | struct StructA(String);  | 
63 |  | -   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait  | 
 | 64 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
64 | 65 |    |  | 
65 | 66 |    = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
 | 67 | +   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`  | 
66 | 68 | help: consider cloning the value if the performance cost is acceptable  | 
67 | 69 |    |  | 
68 | 70 | LL | struct StructA(String.clone());  | 
69 | 71 |    |                      ++++++++  | 
70 | 72 | 
 
  | 
71 |  | -error[E0507]: cannot move out of `self` which is behind a shared reference  | 
 | 73 | +error[E0507]: cannot move out of a shared reference  | 
72 | 74 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
73 | 75 |    |  | 
74 | 76 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
75 | 77 |    |                                            --- in this derive macro expansion  | 
76 | 78 | LL | struct StructA(String);  | 
77 |  | -   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait  | 
 | 79 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
78 | 80 |    |  | 
79 | 81 |    = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
80 | 82 | help: consider cloning the value if the performance cost is acceptable  | 
81 | 83 |    |  | 
82 | 84 | LL | struct StructA(String.clone());  | 
83 | 85 |    |                      ++++++++  | 
84 | 86 | 
 
  | 
85 |  | -error[E0507]: cannot move out of `other` which is behind a shared reference  | 
 | 87 | +error[E0507]: cannot move out of a shared reference  | 
86 | 88 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
87 | 89 |    |  | 
88 | 90 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
89 | 91 |    |                                            --- in this derive macro expansion  | 
90 | 92 | LL | struct StructA(String);  | 
91 |  | -   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait  | 
 | 93 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
92 | 94 |    |  | 
93 | 95 |    = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
 | 96 | +   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`  | 
94 | 97 | help: consider cloning the value if the performance cost is acceptable  | 
95 | 98 |    |  | 
96 | 99 | LL | struct StructA(String.clone());  | 
97 | 100 |    |                      ++++++++  | 
98 | 101 | 
 
  | 
99 |  | -error[E0507]: cannot move out of `self` which is behind a shared reference  | 
 | 102 | +error[E0507]: cannot move out of a shared reference  | 
100 | 103 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
101 | 104 |    |  | 
102 | 105 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
103 | 106 |    |                                                 ---- in this derive macro expansion  | 
104 | 107 | LL | struct StructA(String);  | 
105 |  | -   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait  | 
 | 108 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
106 | 109 |    |  | 
107 | 110 |    = note: `#[derive(Hash)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
108 | 111 | help: consider cloning the value if the performance cost is acceptable  | 
109 | 112 |    |  | 
110 | 113 | LL | struct StructA(String.clone());  | 
111 | 114 |    |                      ++++++++  | 
112 | 115 | 
 
  | 
113 |  | -error[E0507]: cannot move out of `self` which is behind a shared reference  | 
 | 116 | +error[E0507]: cannot move out of a shared reference  | 
114 | 117 |   --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16  | 
115 | 118 |    |  | 
116 | 119 | LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]  | 
117 | 120 |    |                                                       ----- in this derive macro expansion  | 
118 | 121 | LL | struct StructA(String);  | 
119 |  | -   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait  | 
 | 122 | +   |                ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait  | 
120 | 123 |    |  | 
121 | 124 |    = note: `#[derive(Clone)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour  | 
122 | 125 | help: consider cloning the value if the performance cost is acceptable  | 
 | 
0 commit comments