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

48 lines
2.3 KiB
Plaintext
Raw Normal View History

error: reference to packed field is unaligned
--> $DIR/issue-27060.rs:16:13
|
2019-03-09 12:03:44 +00:00
LL | let _ = &good.data;
| ^^^^^^^^^^
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
--> $DIR/issue-27060.rs:8:8
|
LL | #[deny(unaligned_references)]
| ^^^^^^^^^^^^^^^^^^^^
= 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 #82523 <https://github.com/rust-lang/rust/issues/82523>
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
error: reference to packed field is unaligned
--> $DIR/issue-27060.rs:18:13
|
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 #82523 <https://github.com/rust-lang/rust/issues/82523>
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
error: reference to packed field is unaligned
--> $DIR/issue-27060.rs:21:13
|
LL | let _ = &good.data;
| ^^^^^^^^^^
|
= 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 #82523 <https://github.com/rust-lang/rust/issues/82523>
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
error: reference to packed field is unaligned
--> $DIR/issue-27060.rs:23:13
|
2019-03-09 12:03:44 +00: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 #82523 <https://github.com/rust-lang/rust/issues/82523>
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
error: aborting due to 4 previous errors