crate fn enter_alias<F, R>(
        &mut self,
        ty_substs: FxHashMap<DefId, clean::Type>,
        lt_substs: FxHashMap<DefId, clean::Lifetime>,
        ct_substs: FxHashMap<DefId, clean::Constant>,
        f: F,
    ) -> R
    where
        F: FnOnce(&mut Self) -> R,
    {
        let (old_tys, old_lts, old_cts) = (
            mem::replace(&mut self.ty_substs, ty_substs),
            mem::replace(&mut self.lt_substs, lt_substs),
            mem::replace(&mut self.ct_substs, ct_substs),
        );
        let r = f(self);
        self.ty_substs = old_tys;
        self.lt_substs = old_lts;
        self.ct_substs = old_cts;
        r
    }
/// Call the closure with the given parameters set as
/// the substitutions for a type alias' RHS.
Call the closure with the given parameters set as
the substitutions for a type alias' RHS.
Call the closure with the given parameters set as the substitutions for a type alias ' RHS .
crate fn enter_alias<F, R>(
        &mut self,
        ty_substs: FxHashMap<DefId, clean::Type>,
        lt_substs: FxHashMap<DefId, clean::Lifetime>,
        ct_substs: FxHashMap<DefId, clean::Constant>,
        f: F,
    ) -> R
    where
        F: FnOnce(&mut Self) -> R,
    {
        let (old_tys, old_lts, old_cts) = (
            mem::replace(&mut self.ty_substs, ty_substs),
            mem::replace(&mut self.lt_substs, lt_substs),
            mem::replace(&mut self.ct_substs, ct_substs),
        );
        let r = f(self);
        self.ty_substs = old_tys;
        self.lt_substs = old_lts;
        self.ct_substs = old_cts;
        r
    }
crate fn enter_alias < F , R > ( & mut self , ty_substs : FxHashMap < DefId , clean :: Type > , lt_substs : FxHashMap < DefId , clean :: Lifetime > , ct_substs : FxHashMap < DefId , clean :: Constant > , f : F , ) -> R where F : FnOnce ( & mut Self ) -> R , { let ( old_tys , old_lts , old_cts ) = ( mem :: replace ( & mut self . ty_substs , ty_substs ) , mem :: replace ( & mut self . lt_substs , lt_substs ) , mem :: replace ( & mut self . ct_substs , ct_substs ) , ) ; let r = f ( self ) ; self . ty_substs = old_tys ; self . lt_substs = old_lts ; self . ct_substs = old_cts ; r }
Call the closure with the given parameters set as
the substitutions for a type alias' RHS.
Call the closure with the given parameters set as the substitutions for a type alias ' RHS .
&mut self
ty_substs
FxHashMap<DefId, clean::Type>
lt_substs
FxHashMap<DefId, clean::Lifetime>
ct_substs
FxHashMap<DefId, clean::Constant>
f
F
&mut self
ty_substs
FxHashMap<DefId, clean::Type>
lt_substs
FxHashMap<DefId, clean::Lifetime>
ct_substs
FxHashMap<DefId, clean::Constant>
f
F