pub fn for_item<F>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
                       def_id: DefId,
                       mut mk_kind: F)
                       -> &'tcx Substs<'tcx>
    where F: FnMut(&ty::GenericParamDef, &[Kind<'tcx>]) -> Kind<'tcx>
    {
        let defs = tcx.generics_of(def_id);
        let count = defs.count();
        let mut substs = SmallVec::with_capacity(count);
        Substs::fill_item(&mut substs, tcx, defs, &mut mk_kind);
        tcx.intern_substs(&substs)
    }
/// Creates a Substs for generic parameter definitions,
/// by calling closures to obtain each kind.
/// The closures get to observe the Substs as they're
/// being built, which can be used to correctly
/// substitute defaults of generic parameters.
Creates a Substs for generic parameter definitions,
by calling closures to obtain each kind.
The closures get to observe the Substs as they're
being built, which can be used to correctly
substitute defaults of generic parameters.
Creates a Substs for generic parameter definitions by calling closures to obtain each kind . The closures get to observe the Substs as they ' re being built which can be used to correctly substitute defaults of generic parameters .
pub fn for_item<F>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
                       def_id: DefId,
                       mut mk_kind: F)
                       -> &'tcx Substs<'tcx>
    where F: FnMut(&ty::GenericParamDef, &[Kind<'tcx>]) -> Kind<'tcx>
    {
        let defs = tcx.generics_of(def_id);
        let count = defs.count();
        let mut substs = SmallVec::with_capacity(count);
        Substs::fill_item(&mut substs, tcx, defs, &mut mk_kind);
        tcx.intern_substs(&substs)
    }
pub fn for_item < F > ( tcx : TyCtxt < ' a , ' gcx , ' tcx > , def_id : DefId , mut mk_kind : F ) -> & ' tcx Substs < ' tcx > where F : FnMut ( & ty :: GenericParamDef , & [ Kind < ' tcx > ] ) -> Kind < ' tcx > { let defs = tcx . generics_of ( def_id ) ; let count = defs . count ( ) ; let mut substs = SmallVec :: with_capacity ( count ) ; Substs :: fill_item ( & mut substs , tcx , defs , & mut mk_kind ) ; tcx . intern_substs ( & substs ) }
Creates a Substs for generic parameter definitions,
by calling closures to obtain each kind.
Creates a Substs for generic parameter definitions by calling closures to obtain each kind .
tcx
TyCtxt<'a, 'gcx, 'tcx>
def_id
DefId
mk_kind
F
tcx
TyCtxt<'a, 'gcx, 'tcx>
def_id
DefId
mk_kind
F