about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2022-01-20 14:47:31 +0100
committerlcnr <rust@lcnr.de>2022-01-20 14:50:35 +0100
commitc29b637875e837f63d726901cd727199b08a5264 (patch)
treea572f68241dfafb096abb46b2aaed06a57ce0c66 /compiler/rustc_const_eval/src
parent74fbbefea8d13683cca5eee62e4740706cb3144a (diff)
downloadrust-c29b637875e837f63d726901cd727199b08a5264.tar.gz
rust-c29b637875e837f63d726901cd727199b08a5264.zip
update comments
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/interpret/util.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/util.rs b/compiler/rustc_const_eval/src/interpret/util.rs
index 3dde34a6410..6a3378a3896 100644
--- a/compiler/rustc_const_eval/src/interpret/util.rs
+++ b/compiler/rustc_const_eval/src/interpret/util.rs
@@ -3,7 +3,11 @@ use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeVisitor};
 use std::convert::TryInto;
 use std::ops::ControlFlow;
 
-/// Returns `true` if a used generic parameter requires substitution.
+/// Checks whether a type contains generic parameters which require substitution.
+///
+/// In case it does, returns a `TooGeneric` const eval error. Note that due to polymorphization
+/// types may be "concrete enough" even though they still contain generic parameters in
+/// case these parameters are unused.
 crate fn ensure_monomorphic_enough<'tcx, T>(tcx: TyCtxt<'tcx>, ty: T) -> InterpResult<'tcx>
 where
     T: TypeFoldable<'tcx>,