Enum rustc_trans::middle::ty::RegionUnstable [-] [+] [src]

pub enum Region {
    ReEarlyBound(EarlyBoundRegion),
    ReLateBound(DebruijnIndex, BoundRegion),
    ReFree(FreeRegion),
    ReScope(CodeExtent),
    ReStatic,
    ReInfer(InferRegion),
    ReEmpty,
}

Representation of regions:

Variants

ReEarlyBound
ReLateBound
ReFree

When checking a function body, the types of all arguments and so forth that refer to bound region parameters are modified to refer to free region parameters.

ReScope

A concrete region naming some statically determined extent (e.g. an expression or sequence of statements) within the current function.

ReStatic

Static data that has an "infinite" lifetime. Top in the region lattice.

ReInfer

A region variable. Should not exist after typeck.

ReEmpty

Empty lifetime is for data that is never accessed. Bottom in the region lattice. We treat ReEmpty somewhat specially; at least right now, we do not generate instances of it during the GLB computations, but rather generate an error instead. This is to improve error messages. The only way to get an instance of ReEmpty is to have a region variable with no constraints.

Methods

impl Region

fn is_bound(&self) -> bool

fn escapes_depth(&self, depth: u32) -> bool

Trait Implementations

impl tr for Region

fn tr(&self, dcx: &DecodeContext) -> Region

impl RegionEscape for Region

fn has_regions_escaping_depth(&self, depth: u32) -> bool

fn has_escaping_regions(&self) -> bool

impl HasProjectionTypes for Region

fn has_projection_types(&self) -> bool

impl ReferencesError for Region

fn references_error(&self) -> bool

impl<'tcx> TypeFoldable<'tcx> for Region

fn fold_with<F>(&self, folder: &mut F) -> Region where F: TypeFolder<'tcx>

impl<'a, 'tcx> Relate<'a, 'tcx> for Region where 'tcx: 'a

fn relate<R>(relation: &mut R, a: &Region, b: &Region) -> Result<Region, type_err<'tcx>> where R: TypeRelation<'a, 'tcx>

impl<'tcx> Repr<'tcx> for Region

fn repr(&self, tcx: &ctxt) -> String

impl<'tcx> UserString<'tcx> for Region

fn user_string(&self, tcx: &ctxt) -> String

Derived Implementations

impl Copy for Region

impl Debug for Region

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

impl Decodable for Region

fn decode<__D>(__arg_0: &mut __D) -> Result<Region, __D::Error> where __D: Decoder

impl Encodable for Region

fn encode<__S>(&self, __arg_0: &mut __S) -> Result<(), __S::Error> where __S: Encoder

impl Hash for Region

fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Eq for Region

impl PartialEq<Region> for Region

fn eq(&self, __arg_0: &Region) -> bool

fn ne(&self, __arg_0: &Region) -> bool

impl Clone for Region

fn clone(&self) -> Region

fn clone_from(&mut self, source: &Self)