about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2024-01-23 10:17:50 -0500
committerGitHub <noreply@github.com>2024-01-23 10:17:50 -0500
commitc8a675d752364a527967a6ce2be836e385df1bb2 (patch)
treefd77ffcf521c1f9ca9806360b0f4cf7275dffc4f /compiler/rustc_const_eval/src
parent245afd7896007da982df46dbc98f1c7e4b007eae (diff)
downloadrust-c8a675d752364a527967a6ce2be836e385df1bb2.tar.gz
rust-c8a675d752364a527967a6ce2be836e385df1bb2.zip
Add a doc comment for eval_mir_constant
Co-authored-by: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/interpret/machine.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/machine.rs b/compiler/rustc_const_eval/src/interpret/machine.rs
index d32a29ede49..b981a1ee2ca 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<F>(
         ecx: &InterpCx<'mir, 'tcx, Self>,