diff options
Diffstat (limited to 'compiler/rustc_infer/src/infer/generalize.rs')
| -rw-r--r-- | compiler/rustc_infer/src/infer/generalize.rs | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/generalize.rs b/compiler/rustc_infer/src/infer/generalize.rs index 3eeb55ae744..d4a1dacde10 100644 --- a/compiler/rustc_infer/src/infer/generalize.rs +++ b/compiler/rustc_infer/src/infer/generalize.rs @@ -10,6 +10,9 @@ use crate::infer::nll_relate::TypeRelatingDelegate; use crate::infer::type_variable::TypeVariableValue; use crate::infer::{InferCtxt, RegionVariableOrigin}; +/// Attempts to generalize `term` for the type variable `for_vid`. +/// This checks for cycles -- that is, whether the type `term` +/// references `for_vid`. pub(super) fn generalize<'tcx, D: GeneralizerDelegate<'tcx>, T: Into<Term<'tcx>> + Relate<'tcx>>( infcx: &InferCtxt<'tcx>, delegate: &mut D,  | 
