pub struct BorrowSet<'tcx> {
    pub location_map: FxIndexMap<Location, BorrowData<'tcx>>,
    pub activation_map: FxHashMap<Location, Vec<BorrowIndex>>,
    pub local_map: FxHashMap<Local, FxHashSet<BorrowIndex>>,
    pub(crate) locals_state_at_exit: LocalsStateAtExit,
}

Fields

location_map: FxIndexMap<Location, BorrowData<'tcx>>

The fundamental map relating bitvector indexes to the borrows in the MIR. Each borrow is also uniquely identified in the MIR by the Location of the assignment statement in which it appears on the right hand side. Thus the location is the map key, and its position in the map corresponds to BorrowIndex.

activation_map: FxHashMap<Location, Vec<BorrowIndex>>

Locations which activate borrows. NOTE: a given location may activate more than one borrow in the future when more general two-phase borrow support is introduced, but for now we only need to store one borrow index.

local_map: FxHashMap<Local, FxHashSet<BorrowIndex>>

Map from local to all the borrows on that local.

locals_state_at_exit: LocalsStateAtExit

Implementations

Trait Implementations

The returned type after indexing.
Performs the indexing (container[index]) operation. 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: 152 bytes