File tree 3 files changed +37
-0
lines changed
compiler/rustc_lint_defs/src
src/test/ui/consts/const-eval
3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -1052,6 +1052,7 @@ declare_lint! {
1052
1052
"raw pointers must be aligned before dereferencing" ,
1053
1053
@future_incompatible = FutureIncompatibleInfo {
1054
1054
reference: "issue #68585 <https://github.com/rust-lang/rust/issues/104616>" ,
1055
+ reason: FutureIncompatibilityReason :: FutureReleaseErrorReportNow ,
1055
1056
} ;
1056
1057
}
1057
1058
Original file line number Diff line number Diff line change @@ -168,3 +168,21 @@ LL | ptr.read();
168
168
error: aborting due to 15 previous errors
169
169
170
170
For more information about this error, try `rustc --explain E0080`.
171
+ Future incompatibility report: Future breakage diagnostic:
172
+ error: accessing memory with alignment 1, but alignment 4 is required
173
+ --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
174
+ |
175
+ = note: inside `std::ptr::read::<u32>`
176
+ --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
177
+ |
178
+ = note: inside `ptr::const_ptr::<impl *const u32>::read`
179
+ |
180
+ ::: $DIR/ub-ref-ptr.rs:65:5
181
+ |
182
+ LL | ptr.read();
183
+ | ---------- inside `UNALIGNED_READ`
184
+ |
185
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
186
+ = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/104616>
187
+ = note: `#[deny(invalid_alignment)]` on by default
188
+
Original file line number Diff line number Diff line change @@ -168,3 +168,21 @@ LL | ptr.read();
168
168
error: aborting due to 15 previous errors
169
169
170
170
For more information about this error, try `rustc --explain E0080`.
171
+ Future incompatibility report: Future breakage diagnostic:
172
+ error: accessing memory with alignment 1, but alignment 4 is required
173
+ --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
174
+ |
175
+ = note: inside `std::ptr::read::<u32>`
176
+ --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
177
+ |
178
+ = note: inside `ptr::const_ptr::<impl *const u32>::read`
179
+ |
180
+ ::: $DIR/ub-ref-ptr.rs:65:5
181
+ |
182
+ LL | ptr.read();
183
+ | ---------- inside `UNALIGNED_READ`
184
+ |
185
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
186
+ = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/104616>
187
+ = note: `#[deny(invalid_alignment)]` on by default
188
+
You can’t perform that action at this time.
0 commit comments