]> git.lizzy.rs Git - rust.git/blob - src/test/ui/packed/issue-27060.stderr
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / test / ui / packed / issue-27060.stderr
1 error: reference to packed field is unaligned
2   --> $DIR/issue-27060.rs:15:13
3    |
4 LL |     let _ = &good.data;
5    |             ^^^^^^^^^^
6    |
7    = note: `#[deny(unaligned_references)]` on by default
8    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
10    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
11    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
12
13 error: reference to packed field is unaligned
14   --> $DIR/issue-27060.rs:17:13
15    |
16 LL |     let _ = &good.data2[0];
17    |             ^^^^^^^^^^^^^^
18    |
19    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
20    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
21    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
22    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
23
24 error: reference to packed field is unaligned
25   --> $DIR/issue-27060.rs:20:13
26    |
27 LL |     let _ = &good.data;
28    |             ^^^^^^^^^^
29    |
30    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
32    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
33    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
34
35 error: reference to packed field is unaligned
36   --> $DIR/issue-27060.rs:22:13
37    |
38 LL |     let _ = &good.data2[0];
39    |             ^^^^^^^^^^^^^^
40    |
41    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
42    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
43    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
44    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
45
46 error: aborting due to 4 previous errors
47
48 Future incompatibility report: Future breakage diagnostic:
49 error: reference to packed field is unaligned
50   --> $DIR/issue-27060.rs:15:13
51    |
52 LL |     let _ = &good.data;
53    |             ^^^^^^^^^^
54    |
55    = note: `#[deny(unaligned_references)]` on by default
56    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
57    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
58    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
59    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
60
61 Future breakage diagnostic:
62 error: reference to packed field is unaligned
63   --> $DIR/issue-27060.rs:17:13
64    |
65 LL |     let _ = &good.data2[0];
66    |             ^^^^^^^^^^^^^^
67    |
68    = note: `#[deny(unaligned_references)]` on by default
69    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
70    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
71    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
72    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
73
74 Future breakage diagnostic:
75 error: reference to packed field is unaligned
76   --> $DIR/issue-27060.rs:20:13
77    |
78 LL |     let _ = &good.data;
79    |             ^^^^^^^^^^
80    |
81    = note: `#[deny(unaligned_references)]` on by default
82    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
83    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
84    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
85    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
86
87 Future breakage diagnostic:
88 error: reference to packed field is unaligned
89   --> $DIR/issue-27060.rs:22:13
90    |
91 LL |     let _ = &good.data2[0];
92    |             ^^^^^^^^^^^^^^
93    |
94    = note: `#[deny(unaligned_references)]` on by default
95    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
96    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
97    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
98    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
99