Function rustc_trans::middle::ty::anonymize_late_bound_regionsExperimental
[-]
[+]
[src]
pub fn anonymize_late_bound_regions<'tcx, T>(tcx: &ctxt<'tcx>, sig: &Binder<T>) -> T
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
FnSig
s or TraitRef
s 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.