]> git.lizzy.rs Git - rust.git/blob - src/test/ui/packed/issue-27060-rpass.stderr
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / test / ui / packed / issue-27060-rpass.stderr
1 Future incompatibility report: Future breakage diagnostic:
2 warning: reference to packed field is unaligned
3   --> $DIR/issue-27060-rpass.rs:15:13
4    |
5 LL |     let _ = &good.data; // ok
6    |             ^^^^^^^^^^
7    |
8 note: the lint level is defined here
9   --> $DIR/issue-27060-rpass.rs:11:9
10    |
11 LL | #[allow(unaligned_references)]
12    |         ^^^^^^^^^^^^^^^^^^^^
13    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
14    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
15    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
16    = 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)
17
18 Future breakage diagnostic:
19 warning: reference to packed field is unaligned
20   --> $DIR/issue-27060-rpass.rs:16:13
21    |
22 LL |     let _ = &good.data2[0]; // ok
23    |             ^^^^^^^^^^^^^^
24    |
25 note: the lint level is defined here
26   --> $DIR/issue-27060-rpass.rs:11:9
27    |
28 LL | #[allow(unaligned_references)]
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 Future breakage diagnostic:
36 warning: reference to packed field is unaligned
37   --> $DIR/issue-27060-rpass.rs:18:13
38    |
39 LL |     let _ = &good.data;
40    |             ^^^^^^^^^^
41    |
42 note: the lint level is defined here
43   --> $DIR/issue-27060-rpass.rs:11:9
44    |
45 LL | #[allow(unaligned_references)]
46    |         ^^^^^^^^^^^^^^^^^^^^
47    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
48    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
49    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
50    = 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)
51
52 Future breakage diagnostic:
53 warning: reference to packed field is unaligned
54   --> $DIR/issue-27060-rpass.rs:19:13
55    |
56 LL |     let _ = &good.data2[0];
57    |             ^^^^^^^^^^^^^^
58    |
59 note: the lint level is defined here
60   --> $DIR/issue-27060-rpass.rs:11:9
61    |
62 LL | #[allow(unaligned_references)]
63    |         ^^^^^^^^^^^^^^^^^^^^
64    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
65    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
66    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
67    = 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)
68