warning: borrow of packed field is unsafe and requires unsafe block (error E0133) --> $DIR/rfc-2585-safe_packed_borrows-in-unsafe-fn.rs:37:5 | LL | &PACKED.data; | ^^^^^^^^^^^^ borrow of packed field | note: the lint level is defined here --> $DIR/rfc-2585-safe_packed_borrows-in-unsafe-fn.rs:34:8 | LL | #[warn(safe_packed_borrows)] | ^^^^^^^^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior warning: borrow of packed field is unsafe and requires unsafe block (error E0133) --> $DIR/rfc-2585-safe_packed_borrows-in-unsafe-fn.rs:44:5 | LL | &PACKED.data; | ^^^^^^^^^^^^ borrow of packed field | note: the lint level is defined here --> $DIR/rfc-2585-safe_packed_borrows-in-unsafe-fn.rs:41:8 | LL | #[warn(safe_packed_borrows)] | ^^^^^^^^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior warning: borrow of packed field is unsafe and requires unsafe block (error E0133) --> $DIR/rfc-2585-safe_packed_borrows-in-unsafe-fn.rs:57:5 | LL | &PACKED.data; | ^^^^^^^^^^^^ borrow of packed field | note: the lint level is defined here --> $DIR/rfc-2585-safe_packed_borrows-in-unsafe-fn.rs:55:8 | LL | #[warn(unsafe_op_in_unsafe_fn)] | ^^^^^^^^^^^^^^^^^^^^^^ = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior error: borrow of packed field is unsafe and requires unsafe block (error E0133) --> $DIR/rfc-2585-safe_packed_borrows-in-unsafe-fn.rs:63:5 | LL | &PACKED.data; | ^^^^^^^^^^^^ borrow of packed field | note: the lint level is defined here --> $DIR/rfc-2585-safe_packed_borrows-in-unsafe-fn.rs:60:8 | LL | #[deny(safe_packed_borrows)] | ^^^^^^^^^^^^^^^^^^^ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior error: aborting due to previous error; 3 warnings emitted