From c8a675d752364a527967a6ce2be836e385df1bb2 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Tue, 23 Jan 2024 10:17:50 -0500 Subject: [PATCH] Add a doc comment for eval_mir_constant Co-authored-by: Ralf Jung --- compiler/rustc_const_eval/src/interpret/machine.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_const_eval/src/interpret/machine.rs b/compiler/rustc_const_eval/src/interpret/machine.rs index d32a29ede4982..b981a1ee2ca16 100644 --- a/compiler/rustc_const_eval/src/interpret/machine.rs +++ b/compiler/rustc_const_eval/src/interpret/machine.rs @@ -512,6 +512,8 @@ pub trait Machine<'mir, 'tcx: 'mir>: Sized { Ok(()) } + /// Evaluate the given constant. The `eval` function will do all the required evaluation, + /// but this hook has the chance to do some pre/postprocessing. #[inline(always)] fn eval_mir_constant( ecx: &InterpCx<'mir, 'tcx, Self>,