@@ -7,10 +7,6 @@ LL | struct StructA(String);
77 | ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait
88 |
99 = note: `#[derive(Debug)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
10- help: consider cloning the value if the performance cost is acceptable
11- |
12- LL | struct StructA(String.clone());
13- | ++++++++
1410
1511error[E0507]: cannot move out of a shared reference
1612 --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
@@ -21,10 +17,6 @@ LL | struct StructA(String);
2117 | ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait
2218 |
2319 = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
24- help: consider cloning the value if the performance cost is acceptable
25- |
26- LL | struct StructA(String.clone());
27- | ++++++++
2820
2921error[E0507]: cannot move out of a shared reference
3022 --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
@@ -36,10 +28,6 @@ LL | struct StructA(String);
3628 |
3729 = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
3830 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
39- help: consider cloning the value if the performance cost is acceptable
40- |
41- LL | struct StructA(String.clone());
42- | ++++++++
4331
4432error[E0507]: cannot move out of a shared reference
4533 --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
@@ -50,10 +38,6 @@ LL | struct StructA(String);
5038 | ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait
5139 |
5240 = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
53- help: consider cloning the value if the performance cost is acceptable
54- |
55- LL | struct StructA(String.clone());
56- | ++++++++
5741
5842error[E0507]: cannot move out of a shared reference
5943 --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
@@ -65,10 +49,6 @@ LL | struct StructA(String);
6549 |
6650 = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
6751 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
68- help: consider cloning the value if the performance cost is acceptable
69- |
70- LL | struct StructA(String.clone());
71- | ++++++++
7252
7353error[E0507]: cannot move out of a shared reference
7454 --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
@@ -79,10 +59,6 @@ LL | struct StructA(String);
7959 | ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait
8060 |
8161 = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
82- help: consider cloning the value if the performance cost is acceptable
83- |
84- LL | struct StructA(String.clone());
85- | ++++++++
8662
8763error[E0507]: cannot move out of a shared reference
8864 --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
@@ -94,10 +70,6 @@ LL | struct StructA(String);
9470 |
9571 = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
9672 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
97- help: consider cloning the value if the performance cost is acceptable
98- |
99- LL | struct StructA(String.clone());
100- | ++++++++
10173
10274error[E0507]: cannot move out of a shared reference
10375 --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
@@ -108,10 +80,6 @@ LL | struct StructA(String);
10880 | ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait
10981 |
11082 = note: `#[derive(Hash)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
111- help: consider cloning the value if the performance cost is acceptable
112- |
113- LL | struct StructA(String.clone());
114- | ++++++++
11583
11684error[E0507]: cannot move out of a shared reference
11785 --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
@@ -122,10 +90,6 @@ LL | struct StructA(String);
12290 | ^^^^^^ move occurs because value has type `String`, which does not implement the `Copy` trait
12391 |
12492 = note: `#[derive(Clone)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
125- help: consider cloning the value if the performance cost is acceptable
126- |
127- LL | struct StructA(String.clone());
128- | ++++++++
12993
13094error[E0507]: cannot move out of `self` which is behind a shared reference
13195 --> $DIR/deriving-with-repr-packed-move-errors.rs:28:9
0 commit comments