You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
13
13
14
14
error: reference to packed field is unaligned
15
-
--> $DIR/unaligned_references.rs:15:17
15
+
--> $DIR/unaligned_references.rs:16:17
16
+
|
17
+
LL | let _ = &good.data;
18
+
| ^^^^^^^^^^
19
+
|
20
+
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
21
+
22
+
error: reference to packed field is unaligned
23
+
--> $DIR/unaligned_references.rs:18:17
16
24
|
17
25
LL | let _ = &good.data as *const _;
18
26
| ^^^^^^^^^^
19
27
|
20
28
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
21
29
22
30
error: reference to packed field is unaligned
23
-
--> $DIR/unaligned_references.rs:16:27
31
+
--> $DIR/unaligned_references.rs:19:27
24
32
|
25
33
LL | let _: *const _ = &good.data;
26
34
| ^^^^^^^^^^
27
35
|
28
36
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
29
37
30
38
error: reference to packed field is unaligned
31
-
--> $DIR/unaligned_references.rs:17:17
39
+
--> $DIR/unaligned_references.rs:21:17
40
+
|
41
+
LL | let _ = good.data.clone();
42
+
| ^^^^^^^^^
43
+
|
44
+
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
45
+
46
+
error: reference to packed field is unaligned
47
+
--> $DIR/unaligned_references.rs:23:17
32
48
|
33
49
LL | let _ = &good.data2[0];
34
50
| ^^^^^^^^^^^^^^
35
51
|
36
52
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
0 commit comments