rust/src/test/ui/issues/issue-27060.stderr

28 lines
1.3 KiB
Plaintext
Raw Normal View History

error: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
2018-12-25 09:56:47 -06:00
--> $DIR/issue-27060.rs:26:13
|
2019-03-09 06:03:44 -06:00
LL | let _ = &good.data;
| ^^^^^^^^^^
|
note: lint level defined here
2018-12-25 09:56:47 -06:00
--> $DIR/issue-27060.rs:13: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 <https://github.com/rust-lang/rust/issues/46043>
= 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 function or block (error E0133)
2018-12-25 09:56:47 -06:00
--> $DIR/issue-27060.rs:28:13
|
2019-03-09 06:03:44 -06:00
LL | let _ = &good.data2[0];
| ^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 2 previous errors