]> git.lizzy.rs Git - rust.git/commitdiff
Document `op_to_const`'s purpose
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Mon, 10 Aug 2020 09:48:52 +0000 (11:48 +0200)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Sat, 19 Sep 2020 08:36:36 +0000 (10:36 +0200)
compiler/rustc_mir/src/const_eval/eval_queries.rs

index 013c67466057be2136033c9dd2f3c85be27848da..8b0cbae43334b33972e38ce1be4a7dacba958e98 100644 (file)
@@ -104,6 +104,8 @@ pub(super) fn mk_eval_cx<'mir, 'tcx>(
     )
 }
 
+/// This function converts an interpreter value into a constant that is meant for use in the
+/// type system.
 pub(super) fn op_to_const<'tcx>(
     ecx: &CompileTimeEvalContext<'_, 'tcx>,
     op: OpTy<'tcx>,