]> git.proxmox.com Git - rustc.git/blame - vendor/pin-project-lite/tests/ui/pin_project/packed.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / vendor / pin-project-lite / tests / ui / pin_project / packed.stderr
CommitLineData
6a06907d 1error: reference to packed field is unaligned
5099ac24 2 --> tests/ui/pin_project/packed.rs:5:1
6a06907d 3 |
136023e0
XL
45 | / pin_project! { //~ ERROR reference to packed field is unaligned
56 | | #[repr(packed, C)]
67 | | struct Packed {
78 | | #[pin]
89 | | field: u16,
910 | | }
1011 | | }
6a06907d
XL
11 | |_^
12 |
13note: the lint level is defined here
5099ac24 14 --> tests/ui/pin_project/packed.rs:5:1
6a06907d 15 |
136023e0
XL
165 | / pin_project! { //~ ERROR reference to packed field is unaligned
176 | | #[repr(packed, C)]
187 | | struct Packed {
198 | | #[pin]
209 | | field: u16,
2110 | | }
2211 | | }
6a06907d 23 | |_^
136023e0
XL
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>
6a06907d 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)
5099ac24 27 = 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)
923072b8 28 = note: this error originates in the macro `$crate::__pin_project_constant` (in Nightly builds, run with -Z macro-backtrace for more info)
6a06907d 29
136023e0 30error: reference to packed field is unaligned
5099ac24 31 --> tests/ui/pin_project/packed.rs:13:1
6a06907d 32 |
136023e0
XL
3313 | / pin_project! { //~ ERROR reference to packed field is unaligned
3414 | | #[repr(packed(2))]
3515 | | struct PackedN {
3616 | | #[pin]
3717 | | field: u32,
3818 | | }
3919 | | }
6a06907d
XL
40 | |_^
41 |
42note: the lint level is defined here
5099ac24 43 --> tests/ui/pin_project/packed.rs:13:1
6a06907d 44 |
136023e0
XL
4513 | / pin_project! { //~ ERROR reference to packed field is unaligned
4614 | | #[repr(packed(2))]
4715 | | struct PackedN {
4816 | | #[pin]
4917 | | field: u32,
5018 | | }
5119 | | }
6a06907d
XL
52 | |_^
53 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
136023e0
XL
54 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
55 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
5099ac24 56 = 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)
923072b8 57 = note: this error originates in the macro `$crate::__pin_project_constant` (in Nightly builds, run with -Z macro-backtrace for more info)