Enum rustc_mir::borrow_check::diagnostics::region_name::RegionNameSource [−][src]
pub(crate) enum RegionNameSource {
NamedEarlyBoundRegion(Span),
NamedFreeRegion(Span),
Static,
SynthesizedFreeEnvRegion(Span, String),
AnonRegionFromArgument(RegionNameHighlight),
AnonRegionFromUpvar(Span, String),
AnonRegionFromOutput(RegionNameHighlight, String),
AnonRegionFromYieldTy(Span, String),
AnonRegionFromAsyncFn(Span),
}Expand description
Denotes the source of a region that is named by a RegionName. For example, a free region that
was named by the user would get NamedFreeRegion and 'static lifetime would get Static.
This helps to print the right kinds of diagnostics.
Variants
A bound (not free) region that was substituted at the def site (not an HRTB).
Tuple Fields of NamedEarlyBoundRegion
0: SpanA free region that the user has a name ('a) for.
Tuple Fields of NamedFreeRegion
0: SpanThe 'static region.
The free region corresponding to the environment of a closure.
The region corresponding to an argument.
Tuple Fields of AnonRegionFromArgument
The region corresponding to a closure upvar.
The region corresponding to the return type of a closure.
Tuple Fields of AnonRegionFromOutput
The region from a type yielded by a generator.
An anonymous region from an async fn.
Tuple Fields of AnonRegionFromAsyncFn
0: SpanTrait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RegionNameSource
impl !Send for RegionNameSource
impl !Sync for RegionNameSource
impl Unpin for RegionNameSource
impl UnwindSafe for RegionNameSource
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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: 72 bytes