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
Trait Implementations
impl<'a, 'tcx> Relate<'a, 'tcx> for Region where 'tcx: 'a
impl<'tcx> Repr<'tcx> for Region
Derived Implementations
fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).