fn subst(self, substs: &Substs) -> Self
    where
        Self: Sized,
    {
        self.fold(&mut |ty| match ty {
            Ty::Param { idx, name } => {
                substs.get(idx as usize).cloned().unwrap_or(Ty::Param { idx, name })
            }
            ty => ty,
        })
    }
/// Replaces type parameters in this type using the given `Substs`. (So e.g.
/// if `self` is `&[T]`, where type parameter T has index 0, and the
/// `Substs` contain `u32` at index 0, we'll have `&[u32]` afterwards.)
Replaces type parameters in this type using the given `Substs`.
Replaces type parameters in this type using the given ` Substs ` .
fn subst(self, substs: &Substs) -> Self
    where
        Self: Sized,
    {
        self.fold(&mut |ty| match ty {
            Ty::Param { idx, name } => {
                substs.get(idx as usize).cloned().unwrap_or(Ty::Param { idx, name })
            }
            ty => ty,
        })
    }
fn subst ( self , substs : & Substs ) -> Self where Self : Sized , { self . fold ( & mut | ty | match ty { Ty :: Param { idx , name } => { substs . get ( idx as usize ) . cloned ( ) . unwrap_or ( Ty :: Param { idx , name } ) } ty => ty , } ) }
Replaces type parameters in this type using the given `Substs`.
Replaces type parameters in this type using the given ` Substs ` .
self
substs
&Substs
self
substs
&Substs