Struct rustc::middle::subst::Substs[src]
pub struct Substs {
pub types: VecPerParamSpace<t>,
pub regions: RegionSubsts,
}A substitution mapping type/region parameters to new values. We
identify each in-scope parameter by an index and a parameter
space (which indices where the parameter is defined; see
ParamSpace).
Fields
types | |
regions |
Methods
impl Substs
fn new(t: VecPerParamSpace<t>, r: VecPerParamSpace<Region>) -> Substs
fn new_type(t: Vec<t>, r: Vec<Region>) -> Substs
fn new_trait(t: Vec<t>, r: Vec<Region>, s: t) -> Substs
fn erased(t: VecPerParamSpace<t>) -> Substs
fn empty() -> Substs
fn trans_empty() -> Substs
fn is_noop(&self) -> bool
fn self_ty(&self) -> Option<t>
fn with_self_ty(&self, self_ty: t) -> Substs
fn regions<'a>(&'a self) -> &'a VecPerParamSpace<Region>
Since ErasedRegions are only to be used in trans, most of the compiler can use this method to easily access the set of region substitutions.
fn mut_regions<'a>(&'a mut self) -> &'a mut VecPerParamSpace<Region>
Since ErasedRegions are only to be used in trans, most of the compiler can use this method to easily access the set of region substitutions.