pub(crate) struct LifetimeCaptureContext {
pub(crate) parent_def_id: LocalDefId,
pub(crate) captures: FxHashMap<LocalDefId, (Span, NodeId, ParamName, LifetimeRes)>,
pub(crate) binders_to_ignore: FxHashSet<NodeId>,
}Expand description
When we lower a lifetime, it is inserted in captures, and the resolution is modified so
to point to the lifetime parameter impl-trait will generate.
When traversing for<...> binders, they are inserted in binders_to_ignore so we know not
to rebind the introduced lifetimes.
Fields
parent_def_id: LocalDefIdparent def_id for new definitions
captures: FxHashMap<LocalDefId, (Span, NodeId, ParamName, LifetimeRes)>Set of lifetimes to rebind.
binders_to_ignore: FxHashSet<NodeId>Traversed binders. The ids in this set should not be rebound.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LifetimeCaptureContext
impl !Send for LifetimeCaptureContext
impl !Sync for LifetimeCaptureContext
impl Unpin for LifetimeCaptureContext
impl UnwindSafe for LifetimeCaptureContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
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: 72 bytes