Function rustc_infer::infer::generalize::generalize
source · pub(super) fn generalize<'tcx, D: GeneralizerDelegate<'tcx>, T: Into<Term<'tcx>> + Relate<'tcx>>(
infcx: &InferCtxt<'tcx>,
delegate: &mut D,
term: T,
for_vid: impl Into<TermVid<'tcx>>,
ambient_variance: Variance
) -> RelateResult<'tcx, Generalization<T>>
Expand description
Attempts to generalize term
for the type variable for_vid
.
This checks for cycles – that is, whether the type term
references for_vid
.