pub fn substs_wf_in_scope<'a,'tcx>(rcx: &mut Rcx<'a,'tcx>,
                                   origin: infer::ParameterOrigin,
                                   substs: &Substs<'tcx>,
                                   expr_span: Span,
                                   expr_region: ty::Region) {
    debug!("substs_wf_in_scope(substs={:?}, \
            expr_region={:?}, \
            origin={:?}, \
            expr_span={:?})",
           substs, expr_region, origin, expr_span);

    let origin = infer::ParameterInScope(origin, expr_span);

    for &region in substs.regions() {
        rcx.fcx.mk_subr(origin.clone(), expr_region, region);
    }

    for &ty in &substs.types {
        let ty = rcx.resolve_type(ty);
        type_must_outlive(rcx, origin.clone(), ty, expr_region);
    }
}
/// Checks that the values provided for type/region arguments in a given
/// expression are well-formed and in-scope.
Checks that the values provided for type/region arguments in a given
expression are well-formed and in-scope.
Checks that the values provided for type / region arguments in a given expression are well - formed and in - scope .
pub fn substs_wf_in_scope<'a,'tcx>(rcx: &mut Rcx<'a,'tcx>,
                                   origin: infer::ParameterOrigin,
                                   substs: &Substs<'tcx>,
                                   expr_span: Span,
                                   expr_region: ty::Region) {
    debug!("substs_wf_in_scope(substs={:?}, \
            expr_region={:?}, \
            origin={:?}, \
            expr_span={:?})",
           substs, expr_region, origin, expr_span);
    let origin = infer::ParameterInScope(origin, expr_span);
    for &region in substs.regions() {
        rcx.fcx.mk_subr(origin.clone(), expr_region, region);
    }
    for &ty in &substs.types {
        let ty = rcx.resolve_type(ty);
        type_must_outlive(rcx, origin.clone(), ty, expr_region);
    }
}
pub fn substs_wf_in_scope < ' a , ' tcx > ( rcx : & mut Rcx < ' a , ' tcx > , origin : infer :: ParameterOrigin , substs : & Substs < ' tcx > , expr_span : Span , expr_region : ty :: Region ) { debug ! ( " \
 \
 \
 " substs expr_region origin expr_span ) ; let origin = infer :: ParameterInScope ( origin , expr_span ) ; for & region in substs . regions ( ) { rcx . fcx . mk_subr ( origin . clone ( ) , expr_region , region ) ; } for & ty in & substs . types { let ty = rcx . resolve_type ( ty ) ; type_must_outlive ( rcx , origin . clone ( ) , ty , expr_region ) ; } }
Checks that the values provided for type/region arguments in a given
expression are well-formed and in-scope.
Checks that the values provided for type / region arguments in a given expression are well - formed and in - scope .
rcx
&mut Rcx<'a,'tcx>
origin
infer::ParameterOrigin
substs
&Substs<'tcx>
expr_span
Span
expr_region
ty::Region
rcx
&mut Rcx<'a,'tcx>
origin
infer::ParameterOrigin
substs
&Substs<'tcx>
expr_span
Span
expr_region
ty::Region