]> git.proxmox.com Git - rustc.git/blame - src/test/ui/packed/packed-struct-borrow-element.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / packed / packed-struct-borrow-element.stderr
CommitLineData
cdc7bbd5 1warning: reference to packed field is unaligned
04454e1e 2 --> $DIR/packed-struct-borrow-element.rs:26:15
cdc7bbd5
XL
3 |
4LL | let brw = &foo.baz;
5 | ^^^^^^^^
6 |
04454e1e
FG
7note: the lint level is defined here
8 --> $DIR/packed-struct-borrow-element.rs:23:8
9 |
10LL | #[warn(unaligned_references)]
11 | ^^^^^^^^^^^^^^^^^^^^
cdc7bbd5
XL
12 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
14 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
a2a8927a 15 = 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)
cdc7bbd5
XL
16
17warning: reference to packed field is unaligned
04454e1e 18 --> $DIR/packed-struct-borrow-element.rs:31:15
cdc7bbd5
XL
19 |
20LL | let brw = &foo.baz;
21 | ^^^^^^^^
22 |
23 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
24 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
25 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
a2a8927a 26 = 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)
cdc7bbd5
XL
27
28warning: 2 warnings emitted
29
04454e1e
FG
30Future incompatibility report: Future breakage diagnostic:
31warning: reference to packed field is unaligned
32 --> $DIR/packed-struct-borrow-element.rs:26:15
33 |
34LL | let brw = &foo.baz;
35 | ^^^^^^^^
36 |
37note: the lint level is defined here
38 --> $DIR/packed-struct-borrow-element.rs:23:8
39 |
40LL | #[warn(unaligned_references)]
41 | ^^^^^^^^^^^^^^^^^^^^
42 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
43 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
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 = 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)
46
47Future breakage diagnostic:
48warning: reference to packed field is unaligned
49 --> $DIR/packed-struct-borrow-element.rs:31:15
50 |
51LL | let brw = &foo.baz;
52 | ^^^^^^^^
53 |
54note: the lint level is defined here
55 --> $DIR/packed-struct-borrow-element.rs:23:8
56 |
57LL | #[warn(unaligned_references)]
58 | ^^^^^^^^^^^^^^^^^^^^
59 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
60 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
61 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
62 = 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)
63