[−][src]Trait rustc_trait_selection::infer::OutlivesEnvironmentExt
Required methods
pub fn add_implied_bounds<'a>(
&mut self,
infcx: &InferCtxt<'a, 'tcx>,
fn_sig_tys: &[Ty<'tcx>],
body_id: HirId,
span: Span
)[src]
&mut self,
infcx: &InferCtxt<'a, 'tcx>,
fn_sig_tys: &[Ty<'tcx>],
body_id: HirId,
span: Span
)
Implementors
impl<'tcx> OutlivesEnvironmentExt<'tcx> for OutlivesEnvironment<'tcx>[src]
pub fn add_implied_bounds<'a>(
&mut self,
infcx: &InferCtxt<'a, 'tcx>,
fn_sig_tys: &[Ty<'tcx>],
body_id: HirId,
span: Span
)[src]
&mut self,
infcx: &InferCtxt<'a, 'tcx>,
fn_sig_tys: &[Ty<'tcx>],
body_id: HirId,
span: Span
)
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/compile-fail/regions-free-region-ordering-*.rs