/// Creates a concatenated set of substitutions which includes those from the impl and those from
/// the method.  This are some subtle complications here.  Statically, we have a list of type
/// parameters like `[T0, T1, T2, M1, M2, M3]` where `Tn` are type parameters that appear on the
/// receiver.  For example, if the receiver is a method parameter `A` with a bound like
/// `trait<B,C,D>` then `Tn` would be `[B,C,D]`.
///
/// The weird part is that the type `A` might now be bound to any other type, such as `foo<X>`.
/// In that case, the vector we want is: `[X, M1, M2, M3]`.  Therefore, what we do now is to slice
/// off the method type parameters and append them to the type parameters from the type that the
/// receiver is mapped to.
Creates a concatenated set of substitutions which includes those from the impl and those from
the method.  This are some subtle complications here.  Statically, we have a list of type
parameters like `[T0, T1, T2, M1, M2, M3]` where `Tn` are type parameters that appear on the
receiver.

The weird part is that the type `A` might now be bound to any other type, such as `foo`.
In that case, the vector we want is: `[X, M1, M2, M3]`.  Therefore, what we do now is to slice
off the method type parameters and append them to the type parameters from the type that the
receiver is mapped to.
Creates a concatenated set of substitutions which includes those from the impl and those from the method . This are some subtle complications here . Statically we have a list of type parameters like ` [ T0 T1 T2 M1 M2 M3 ] ` where ` Tn ` are type parameters that appear on the receiver . The weird part is that the type ` A ` might now be bound to any other type such as ` foo ` . In that case the vector we want is : ` [ X M1 M2 M3 ] ` . Therefore what we do now is to slice off the method type parameters and append them to the type parameters from the type that the receiver is mapped to .
fn combine_impl_and_methods_tps<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                            node: ExprOrMethodCall,
                                            rcvr_substs: subst::Substs<'tcx>)
                                            -> subst::Substs<'tcx>
{
    let ccx = bcx.ccx();
    let node_substs = node_id_substs(ccx, node, bcx.fcx.param_substs);
    debug!("rcvr_substs={:?}", rcvr_substs);
    debug!("node_substs={:?}", node_substs);
    // Break apart the type parameters from the node and type
    // parameters from the receiver.
    let node_method = node_substs.types.split().fns;
    let subst::SeparateVecsPerParamSpace {
        types: rcvr_type,
        selfs: rcvr_self,
        fns: rcvr_method
    } = rcvr_substs.types.clone().split();
    assert!(rcvr_method.is_empty());
    subst::Substs {
        regions: subst::ErasedRegions,
        types: subst::VecPerParamSpace::new(rcvr_type, rcvr_self, node_method)
    }
}
fn combine_impl_and_methods_tps < ' blk , ' tcx > ( bcx : Block < ' blk , ' tcx > , node : ExprOrMethodCall , rcvr_substs : subst :: Substs < ' tcx > ) -> subst :: Substs < ' tcx > { let ccx = bcx . ccx ( ) ; let node_substs = node_id_substs ( ccx , node , bcx . fcx . param_substs ) ; debug ! ( " " rcvr_substs ) ; debug ! ( " " node_substs ) ; // Break apart the type parameters from the node and type // parameters from the receiver. let node_method = node_substs . types . split ( ) . fns ; let subst :: SeparateVecsPerParamSpace { types : rcvr_type , selfs : rcvr_self , fns : rcvr_method } = rcvr_substs . types . clone ( ) . split ( ) ; assert ! ( rcvr_method is_empty ( ) ) ; subst :: Substs { regions : subst :: ErasedRegions , types : subst :: VecPerParamSpace :: new ( rcvr_type , rcvr_self , node_method ) } }
Creates a concatenated set of substitutions which includes those from the impl and those from
the method.
Creates a concatenated set of substitutions which includes those from the impl and those from the method .
bcx
Block<'blk, 'tcx>
node
ExprOrMethodCall
rcvr_substs
subst::Substs<'tcx>