Function rustc::middle::ty::anonymize_late_bound_regionsExperimental
[-]
[+]
[src]
pub fn anonymize_late_bound_regions<'tcx, T>(tcx: &ctxt<'tcx>, sig: &Binder<T>) -> T where T: TypeFoldable<'tcx> + Repr<'tcx>Rewrite any late-bound regions so that they are anonymous. Region numbers are assigned starting at 1 and increasing monotonically in the order traversed by the fold operation.
The chief purpose of this function is to canonicalize regions so that two
FnSigs or TraitRefs which are equivalent up to region naming will become
structurally identical. For example, for<'a, 'b> fn(&'a int, &'b int) and
for<'a, 'b> fn(&'b int, &'a int) will become identical after anonymization.