mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Always report alignment failures in future incompat summaries
This commit is contained in:
parent
d9d92ed7da
commit
98dc76a374
@ -1052,6 +1052,7 @@ declare_lint! {
|
||||
"raw pointers must be aligned before dereferencing",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #68585 <https://github.com/rust-lang/rust/issues/104616>",
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorReportNow,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -168,3 +168,21 @@ LL | ptr.read();
|
||||
error: aborting due to 15 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
error: accessing memory with alignment 1, but alignment 4 is required
|
||||
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
||||
|
|
||||
= note: inside `std::ptr::read::<u32>`
|
||||
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
||||
|
|
||||
= note: inside `ptr::const_ptr::<impl *const u32>::read`
|
||||
|
|
||||
::: $DIR/ub-ref-ptr.rs:65:5
|
||||
|
|
||||
LL | ptr.read();
|
||||
| ---------- inside `UNALIGNED_READ`
|
||||
|
|
||||
= 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 #68585 <https://github.com/rust-lang/rust/issues/104616>
|
||||
= note: `#[deny(invalid_alignment)]` on by default
|
||||
|
||||
|
@ -168,3 +168,21 @@ LL | ptr.read();
|
||||
error: aborting due to 15 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
error: accessing memory with alignment 1, but alignment 4 is required
|
||||
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
||||
|
|
||||
= note: inside `std::ptr::read::<u32>`
|
||||
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
||||
|
|
||||
= note: inside `ptr::const_ptr::<impl *const u32>::read`
|
||||
|
|
||||
::: $DIR/ub-ref-ptr.rs:65:5
|
||||
|
|
||||
LL | ptr.read();
|
||||
| ---------- inside `UNALIGNED_READ`
|
||||
|
|
||||
= 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 #68585 <https://github.com/rust-lang/rust/issues/104616>
|
||||
= note: `#[deny(invalid_alignment)]` on by default
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user