diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-07-28 08:45:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-28 08:45:28 +0200 |
| commit | 466198cfaf2ea988a98aee08df10ed1198a3874a (patch) | |
| tree | e9c9a7f48ae84ba9e277f06252ebdfbe076694e9 /compiler/rustc_const_eval/src/interpret/eval_context.rs | |
| parent | 9c99623b8ade68ae07a6226018732f2512526d34 (diff) | |
| parent | 645b85e3d508123d45d79dc6e526a06648666c68 (diff) | |
Merge pull request #2519 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/eval_context.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/eval_context.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/eval_context.rs b/compiler/rustc_const_eval/src/interpret/eval_context.rs index 11e7706fe60..0c888694e49 100644 --- a/compiler/rustc_const_eval/src/interpret/eval_context.rs +++ b/compiler/rustc_const_eval/src/interpret/eval_context.rs @@ -582,8 +582,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { span: Span, layout: Option<TyAndLayout<'tcx>>, ) -> InterpResult<'tcx, OpTy<'tcx, M::Provenance>> { - M::eval_mir_constant(self, *val, span, layout, |ecx, val, span, layout| { - let const_val = val.eval(*ecx.tcx, ecx.typing_env, span).map_err(|err| { + let const_val = val.eval(*self.tcx, self.typing_env, span).map_err(|err| { if M::ALL_CONSTS_ARE_PRECHECKED { match err { ErrorHandled::TooGeneric(..) => {}, @@ -599,11 +598,10 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { } } } - err.emit_note(*ecx.tcx); + err.emit_note(*self.tcx); err })?; - ecx.const_val_to_op(const_val, val.ty(), layout) - }) + self.const_val_to_op(const_val, val.ty(), layout) } #[must_use] |
