Struct rustc_trans::middle::subst::SubstsUnstable
[-] [+]
[src]
pub struct Substs<'tcx> { pub types: VecPerParamSpace<&'tcx TyS<'tcx>>, 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<'tcx> Substs<'tcx>
fn new(t: VecPerParamSpace<&'tcx TyS<'tcx>>, r: VecPerParamSpace<Region>) -> Substs<'tcx>
fn new_type(t: Vec<&'tcx TyS<'tcx>>, r: Vec<Region>) -> Substs<'tcx>
fn new_trait(t: Vec<&'tcx TyS<'tcx>>, r: Vec<Region>, s: &'tcx TyS<'tcx>) -> Substs<'tcx>
fn erased(t: VecPerParamSpace<&'tcx TyS<'tcx>>) -> Substs<'tcx>
fn empty() -> Substs<'tcx>
fn trans_empty() -> Substs<'tcx>
fn is_noop(&self) -> bool
fn type_for_def(&self, ty_param_def: &TypeParameterDef) -> &'tcx TyS<'tcx>
fn has_regions_escaping_depth(&self, depth: u32) -> bool
fn self_ty(&self) -> Option<&'tcx TyS<'tcx>>
fn with_self_ty(&self, self_ty: &'tcx TyS<'tcx>) -> Substs<'tcx>
fn erase_regions(self) -> Substs<'tcx>
fn regions(&'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 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.