pub enum LateParamRegionKind {
Anon(u32),
NamedAnon(u32, Symbol),
Named(DefId),
ClosureEnv,
}Expand description
When liberating bound regions, we map their BoundRegionKind
to this as we need to track the index of anonymous regions. We
otherwise end up liberating multiple bound regions to the same
late-bound region.
Variants§
Anon(u32)
An anonymous region parameter for a given fn (&T)
Unlike BoundRegionKind::Anon, this tracks the index of the
liberated bound region.
We should ideally never liberate anonymous regions, but do so for the
sake of diagnostics in FnCtxt::sig_of_closure_with_expectation.
NamedAnon(u32, Symbol)
An anonymous region parameter with a Symbol name.
Used to give late-bound regions names for things like pretty printing.
Named(DefId)
Late-bound regions that appear in the AST.
ClosureEnv
Anonymous region for the implicit env pointer parameter to a closure
Auto Trait Implementations§
impl Freeze for LateParamRegionKind
impl RefUnwindSafe for LateParamRegionKind
impl Send for LateParamRegionKind
impl Sync for LateParamRegionKind
impl Unpin for LateParamRegionKind
impl UnwindSafe for LateParamRegionKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more