fn impl_ty_and_substs(&self,
                          impl_def_id: DefId)
                          -> (Ty<'tcx>, subst::Substs<'tcx>)
    {
        let impl_pty = self.tcx().lookup_item_type(impl_def_id);

        let type_vars =
            impl_pty.generics.types.map(
                |_| self.infcx().next_ty_var());

        let region_placeholders =
            impl_pty.generics.regions.map(
                |_| ty::ReStatic); // see erase_late_bound_regions() for an expl of why 'static

        let substs = subst::Substs::new(type_vars, region_placeholders);
        (impl_pty.ty, substs)
    }
/// Get the type of an impl and generate substitutions with placeholders.
Get the type of an impl and generate substitutions with placeholders.
Get the type of an impl and generate substitutions with placeholders .
fn impl_ty_and_substs(&self,
                          impl_def_id: DefId)
                          -> (Ty<'tcx>, subst::Substs<'tcx>)
    {
        let impl_pty = self.tcx().lookup_item_type(impl_def_id);
        let type_vars =
            impl_pty.generics.types.map(
                |_| self.infcx().next_ty_var());
        let region_placeholders =
            impl_pty.generics.regions.map(
                |_| ty::ReStatic); // see erase_late_bound_regions() for an expl of why 'static
        let substs = subst::Substs::new(type_vars, region_placeholders);
        (impl_pty.ty, substs)
    }
fn impl_ty_and_substs ( & self , impl_def_id : DefId ) -> ( Ty < ' tcx > , subst :: Substs < ' tcx > ) { let impl_pty = self . tcx ( ) . lookup_item_type ( impl_def_id ) ; let type_vars = impl_pty . generics . types . map ( | _ | self . infcx ( ) . next_ty_var ( ) ) ; let region_placeholders = impl_pty . generics . regions . map ( | _ | ty :: ReStatic ) ; // see erase_late_bound_regions() for an expl of why 'static let substs = subst :: Substs :: new ( type_vars , region_placeholders ) ; ( impl_pty . ty , substs ) }
Get the type of an impl and generate substitutions with placeholders.
Get the type of an impl and generate substitutions with placeholders .
&self
impl_def_id
DefId
&self
impl_def_id
DefId