Type Alias rustc_middle::ty::sty::RegionKind

source ·
pub type RegionKind<'tcx> = RegionKind<TyCtxt<'tcx>>;

Aliased Type§

enum RegionKind<'tcx> {
    ReEarlyBound(EarlyBoundRegion),
    ReLateBound(DebruijnIndex, BoundRegion),
    ReFree(FreeRegion),
    ReStatic,
    ReVar(RegionVid),
    RePlaceholder(Placeholder<BoundRegion>),
    ReErased,
    ReError(ErrorGuaranteed),
}

Variants§

§

ReEarlyBound(EarlyBoundRegion)

Region bound in a type or fn declaration which will be substituted ‘early’ – that is, at the same time when type parameters are substituted.

§

ReLateBound(DebruijnIndex, BoundRegion)

Region bound in a function scope, which will be substituted when the function is called.

§

ReFree(FreeRegion)

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.

§

ReStatic

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

§

ReVar(RegionVid)

A region variable. Should not exist outside of type inference.

§

RePlaceholder(Placeholder<BoundRegion>)

A placeholder region – basically, the higher-ranked version of ReFree. Should not exist outside of type inference.

§

ReErased

Erased region, used by trait selection, in MIR and during codegen.

§

ReError(ErrorGuaranteed)

A region that resulted from some other error. Used exclusively for diagnostics.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes

Size for each variant:

  • ReEarlyBound: 16 bytes
  • ReLateBound: 20 bytes
  • ReFree: 20 bytes
  • ReStatic: 0 bytes
  • ReVar: 4 bytes
  • RePlaceholder: 20 bytes
  • ReErased: 0 bytes
  • ReError: 0 bytes