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
NamedEarlyBoundRegion(Span)Expand description
A bound (not free) region that was substituted at the def site (not an HRTB).
NamedFreeRegion(Span)Expand description
A free region that the user has a name ('a) for.
Expand description
The 'static region.
Expand description
The free region corresponding to the environment of a closure.
AnonRegionFromArgument(RegionNameHighlight)Expand description
The region corresponding to an argument.
Expand description
The region corresponding to a closure upvar.
AnonRegionFromOutput(RegionNameHighlight, String)Expand description
The region corresponding to the return type of a closure.
Expand description
The region from a type yielded by a generator.
AnonRegionFromAsyncFn(Span)Expand description
An anonymous region from an async fn.
Trait Implementations
impl Clone for RegionNameSource[src]
impl Clone for RegionNameSource[src]fn clone(&self) -> RegionNameSource[src]
fn clone(&self) -> RegionNameSource[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]