Function rustc_lint::middle::ty::required_region_boundsUnstable [-] [+] [src]

pub fn required_region_bounds(tcx: &ctxt<'tcx>, erased_self_ty: &'tcx TyS<'tcx>, predicates: Vec<Predicate<'tcx>>) -> Vec<Region>

Given a set of predicates that apply to an object type, returns the region bounds that the (erased) Self type must outlive. Precisely because the Self type is erased, the parameter erased_self_ty must be supplied to indicate what type has been used to represent Self in the predicates themselves. This should really be a unique type; FreshTy(0) is a popular choice.

Requires that trait definitions have been processed so that we can elaborate predicates and walk supertraits.