Trait rustc_typeck::check::regionck::OutlivesEnvironmentExt[][src]

trait OutlivesEnvironmentExt<'tcx> {
    fn add_implied_bounds<'a>(
        &mut self,
        infcx: &InferCtxt<'a, 'tcx>,
        fn_sig_tys: FxHashSet<Ty<'tcx>>,
        body_id: HirId,
        span: Span
    ); }

Required methods

Implementations on Foreign Types

This method adds “implied bounds” into the outlives environment. Implied bounds are outlives relationships that we can deduce on the basis that certain types must be well-formed – these are either the types that appear in the function signature or else the input types to an impl. For example, if you have a function like

fn foo<'a, 'b, T>(x: &'a &'b [T]) { }

we can assume in the caller’s body that 'b: 'a and that T: 'b (and hence, transitively, that T: 'a). This method would add those assumptions into the outlives-environment.

Tests: src/test/ui/regions/regions-free-region-ordering-*.rs

Implementors