diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-20 18:28:48 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-02-22 00:13:19 +0000 |
| commit | 3d5438accdd111b4e507bbfae5e2df6062fb5689 (patch) | |
| tree | ad1ce2c9f163d0077abf245b57ce7a9da5eba2db /compiler/rustc_const_eval/src | |
| parent | e1819a889a2606b79dc9cc790205da1497d617b7 (diff) | |
| download | rust-3d5438accdd111b4e507bbfae5e2df6062fb5689.tar.gz rust-3d5438accdd111b4e507bbfae5e2df6062fb5689.zip | |
Fix binding mode problems
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/machine.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs index 82e0a6e6666..4db862afd9f 100644 --- a/compiler/rustc_const_eval/src/const_eval/machine.rs +++ b/compiler/rustc_const_eval/src/const_eval/machine.rs @@ -502,12 +502,10 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> { RemainderByZero(op) => RemainderByZero(eval_to_int(op)?), ResumedAfterReturn(coroutine_kind) => ResumedAfterReturn(*coroutine_kind), ResumedAfterPanic(coroutine_kind) => ResumedAfterPanic(*coroutine_kind), - MisalignedPointerDereference { ref required, ref found } => { - MisalignedPointerDereference { - required: eval_to_int(required)?, - found: eval_to_int(found)?, - } - } + MisalignedPointerDereference { required, found } => MisalignedPointerDereference { + required: eval_to_int(required)?, + found: eval_to_int(found)?, + }, NullPointerDereference => NullPointerDereference, }; Err(ConstEvalErrKind::AssertFailure(err)).into() |
