about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/errors.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-09-05 15:12:18 +0200
committerRalf Jung <post@ralfj.de>2023-10-15 18:13:31 +0200
commitf3f9b795bdaccd8284baba295810e87646754c28 (patch)
tree850bc64dc61769301b12001add54ac4ef672e76d /compiler/rustc_const_eval/src/errors.rs
parentea9a24e32e5ce4d049c1ac0d85613f9f100fa7fb (diff)
downloadrust-f3f9b795bdaccd8284baba295810e87646754c28.tar.gz
rust-f3f9b795bdaccd8284baba295810e87646754c28.zip
place evaluation: require the original pointer to be aligned if an access happens
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
-rw-r--r--compiler/rustc_const_eval/src/errors.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index 96575c31c08..6214ce0f511 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -5,8 +5,9 @@ use rustc_errors::{
 use rustc_hir::ConstContext;
 use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
 use rustc_middle::mir::interpret::{
-    CheckInAllocMsg, ExpectedKind, InterpError, InvalidMetaKind, InvalidProgramInfo, PointerKind,
-    ResourceExhaustionInfo, UndefinedBehaviorInfo, UnsupportedOpInfo, ValidationErrorInfo,
+    CheckInAllocMsg, ExpectedKind, InterpError, InvalidMetaKind, InvalidProgramInfo, Misalignment,
+    PointerKind, ResourceExhaustionInfo, UndefinedBehaviorInfo, UnsupportedOpInfo,
+    ValidationErrorInfo,
 };
 use rustc_middle::ty::{self, Ty};
 use rustc_span::Span;
@@ -567,7 +568,7 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> {
 
                 builder.set_arg("bad_pointer_message", bad_pointer_message(msg, handler));
             }
-            AlignmentCheckFailed { required, has } => {
+            AlignmentCheckFailed(Misalignment { required, has }) => {
                 builder.set_arg("required", required.bytes());
                 builder.set_arg("has", has.bytes());
             }