Function rustc_trans::middle::typeck::astconv::compute_opt_region_boundExperimental [-]  [+] [src]

pub fn compute_opt_region_bound(tcx: &ctxt<'tcx>, span: Span, builtin_bounds: EnumSet<BuiltinBound>, region_bounds: &[&Lifetime], trait_bounds: &[Rc<TraitRef<'tcx>>]) -> Option<Region>

Given the bounds on a type parameter / existential type, determines what single region bound (if any) we can use to summarize this type. The basic idea is that we will use the bound the user provided, if they provided one, and otherwise search the supertypes of trait bounds for region bounds. It may be that we can derive no bound at all, in which case we return None.