| 1 |
error: lint `safe_packed_borrows` has been removed: converted into hard error, see issue #82523 <https://github.com/rust-lang/rust/issues/82523> for more information |
| 2 |
--> tests/ui/pin_project/safe_packed_borrows.rs:2:9 |
| 3 |
| |
| 4 |
2 | #![deny(safe_packed_borrows)] //~ ERROR has been renamed to `unaligned_references` |
| 5 |
| ^^^^^^^^^^^^^^^^^^^ |
| 6 |
| |
| 7 |
note: the lint level is defined here |
| 8 |
--> tests/ui/pin_project/safe_packed_borrows.rs:1:9 |
| 9 |
| |
| 10 |
1 | #![deny(renamed_and_removed_lints)] |
| 11 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 |
|
| 13 |
error[E0793]: reference to packed field is unaligned |
| 14 |
--> tests/ui/pin_project/safe_packed_borrows.rs:21:13 |
| 15 |
| |
| 16 |
21 | let _ = &a.f; |
| 17 |
| ^^^^ |
| 18 |
| |
| 19 |
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses |
| 20 |
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) |
| 21 |
= 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) |
| 22 |
|
| 23 |
error[E0793]: reference to packed field is unaligned |
| 24 |
--> tests/ui/pin_project/safe_packed_borrows.rs:24:13 |
| 25 |
| |
| 26 |
24 | let _ = &b.f; |
| 27 |
| ^^^^ |
| 28 |
| |
| 29 |
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses |
| 30 |
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) |
| 31 |
= 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) |