Debian Codegraph @

third_party/rust/pin-project-lite/tests/ui/pin_project/packed.stderr

raw
1 error[E0793]: reference to packed field is unaligned
2 --> tests/ui/pin_project/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: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
14 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
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)
16 = note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
17
18 error[E0793]: reference to packed field is unaligned
19 --> tests/ui/pin_project/packed.rs:5:1
20 |
21 5 | / pin_project! { //~ ERROR reference to packed field is unaligned
22 6 | | #[repr(packed, C)]
23 7 | | struct Packed {
24 8 | | #[pin]
25 9 | | field: u16,
26 10 | | }
27 11 | | }
28 | |_^
29 |
30 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
31 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
32 = 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)
33 = note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
34
35 error[E0793]: reference to packed field is unaligned
36 --> tests/ui/pin_project/packed.rs:5:1
37 |
38 5 | / pin_project! { //~ ERROR reference to packed field is unaligned
39 6 | | #[repr(packed, C)]
40 7 | | struct Packed {
41 8 | | #[pin]
42 9 | | field: u16,
43 10 | | }
44 11 | | }
45 | |_^
46 |
47 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
48 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
49 = 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)
50 = note: this error originates in the macro `$crate::__pin_project_constant` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
51
52 error[E0793]: reference to packed field is unaligned
53 --> tests/ui/pin_project/packed.rs:13:1
54 |
55 13 | / pin_project! { //~ ERROR reference to packed field is unaligned
56 14 | | #[repr(packed(2))]
57 15 | | struct PackedN {
58 16 | | #[pin]
59 17 | | field: u32,
60 18 | | }
61 19 | | }
62 | |_^
63 |
64 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
65 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
66 = 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)
67 = note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
68
69 error[E0793]: reference to packed field is unaligned
70 --> tests/ui/pin_project/packed.rs:13:1
71 |
72 13 | / pin_project! { //~ ERROR reference to packed field is unaligned
73 14 | | #[repr(packed(2))]
74 15 | | struct PackedN {
75 16 | | #[pin]
76 17 | | field: u32,
77 18 | | }
78 19 | | }
79 | |_^
80 |
81 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
82 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
83 = 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)
84 = note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)
85
86 error[E0793]: reference to packed field is unaligned
87 --> tests/ui/pin_project/packed.rs:13:1
88 |
89 13 | / pin_project! { //~ ERROR reference to packed field is unaligned
90 14 | | #[repr(packed(2))]
91 15 | | struct PackedN {
92 16 | | #[pin]
93 17 | | field: u32,
94 18 | | }
95 19 | | }
96 | |_^
97 |
98 = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
99 = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
100 = 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)
101 = note: this error originates in the macro `$crate::__pin_project_constant` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)