Expand description
A public API provided for the Rust compiler consumers. This file provides API for compiler consumers.
Re-exportsยง
use rustc_data_structures::fx::FxHashMap;๐use rustc_hir::def_id::LocalDefId;๐use rustc_index::IndexVec;๐use rustc_middle::mir::Body;๐use rustc_middle::mir::Promoted;๐use rustc_middle::ty::TyCtxt;๐use rustc_span::bug;๐pub use super::borrow_set::BorrowData;pub use super::borrow_set::BorrowSet;pub use super::borrow_set::TwoPhaseActivation;pub use super::constraints::OutlivesConstraint;pub use super::dataflow::BorrowIndex;pub use super::dataflow::Borrows;pub use super::dataflow::calculate_borrows_out_of_scope_at_location;pub use super::place_ext::PlaceExt;pub use super::places_conflict::PlaceConflictBias;pub use super::places_conflict::places_conflict;pub use super::polonius::legacy::PoloniusFacts as PoloniusInput;pub use super::polonius::legacy::PoloniusLocationTable;pub use super::polonius::legacy::PoloniusOutput;pub use super::polonius::legacy::PoloniusRegionVid;pub use super::polonius::legacy::RichLocation;pub use super::polonius::legacy::RustcFacts;pub use super::region_infer::RegionInferenceContext;use crate::BorrowCheckRootCtxt;๐
Structsยง
- Body
With Borrowck Facts - A
Bodywith information computed by the borrow checker. This struct is intended to be consumed by compiler consumers. - Borrowck
Consumer ๐ - Struct used during mir borrowck to collect bodies with facts for a typeck root and all its nested bodies.
Enumsยง
- Consumer
Options - Options determining the output behavior of
get_bodies_with_borrowck_facts.
Functionsยง
- get_
bodies_ with_ borrowck_ facts - This function computes borrowck facts for the given def id and all its nested bodies.
It must be called with a typeck root which will then borrowck all nested bodies as well.
The
ConsumerOptionsdetermine which facts are returned. This function makes a copy of the bodies because it needs to regenerate the region identifiers. It should never be invoked during a typical compilation session due to the unnecessary overhead of returningBodyWithBorrowckFacts.