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: LocalDefId

parent 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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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