]> git.proxmox.com Git - rustc.git/blob - vendor/pin-project-lite/tests/ui/pin_project/packed.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / vendor / pin-project-lite / tests / ui / pin_project / packed.stderr
1 error: reference to packed field is unaligned
2 --> $DIR/packed.rs:5:1
3 |
4 5 | / pin_project! { //~ ERROR reference to packed field is unaligned
5 6 | | #[repr(packed, C)]
6 7 | | struct Packed {
7 8 | | #[pin]
8 9 | | field: u16,
9 10 | | }
10 11 | | }
11 | |_^
12 |
13 note: the lint level is defined here
14 --> $DIR/packed.rs:5:1
15 |
16 5 | / pin_project! { //~ ERROR reference to packed field is unaligned
17 6 | | #[repr(packed, C)]
18 7 | | struct Packed {
19 8 | | #[pin]
20 9 | | field: u16,
21 10 | | }
22 11 | | }
23 | |_^
24 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
25 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
26 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
27 = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
28
29 error: reference to packed field is unaligned
30 --> $DIR/packed.rs:13:1
31 |
32 13 | / pin_project! { //~ ERROR reference to packed field is unaligned
33 14 | | #[repr(packed(2))]
34 15 | | struct PackedN {
35 16 | | #[pin]
36 17 | | field: u32,
37 18 | | }
38 19 | | }
39 | |_^
40 |
41 note: the lint level is defined here
42 --> $DIR/packed.rs:13:1
43 |
44 13 | / pin_project! { //~ ERROR reference to packed field is unaligned
45 14 | | #[repr(packed(2))]
46 15 | | struct PackedN {
47 16 | | #[pin]
48 17 | | field: u32,
49 18 | | }
50 19 | | }
51 | |_^
52 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
53 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
54 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
55 = note: this error originates in the macro `$crate::__pin_project_internal` (in Nightly builds, run with -Z macro-backtrace for more info)