Expand description
Functions dedicated to fact generation for the -Zpolonius=legacy datalog implementation.
Will be removed in the future, once the in-tree -Zpolonius=next implementation reaches feature
parity.
Re-exportsΒ§
use std::iter;πuse either::Either;πuse rustc_middle::mir::Body;πuse rustc_middle::mir::Local;πuse rustc_middle::mir::LocalKind;πuse rustc_middle::mir::Location;πuse rustc_middle::ty::GenericArg;πuse rustc_middle::ty::TyCtxt;πuse rustc_mir_dataflow::move_paths::InitKind;πuse rustc_mir_dataflow::move_paths::InitLocation;πuse rustc_mir_dataflow::move_paths::MoveData;πuse tracing::debug;πuse crate::borrow_set::BorrowSet;πuse crate::constraints::OutlivesConstraint;πuse crate::handle_placeholders::LoweredConstraints;πuse crate::type_check::free_region_relations::UniversalRegionRelations;πuse crate::universal_regions::UniversalRegions;π
ModulesΒ§
- accesses π
- facts π
- loan_
invalidations π - loan_
kills π - location π
StructsΒ§
- Fact
Writer - Location
Index - Polonius
Location Table - Maps between a MIR Location, which identifies a particular
statement within a basic block, to a βrich locationβ, which
identifies at a finer granularity. In particular, we distinguish
the start of a statement and the mid-point. The mid-point is
the point just before the statement takes effect; in particular,
for an assignment
A = B, it is the point where B is about to be written into A. This mid-point is a kind of hack to work around our inability to track the position information at sufficient granularity through outlives relations; however, the rich location table serves another purpose: it compresses locations from multiple words into a single u32. - Polonius
Region Vid - A (kinda) newtype of
RegionVidso we can implementAtomon it. - Rustc
Facts
EnumsΒ§
TraitsΒ§
FunctionsΒ§
- emit_
drop_ πfacts - For every potentially drop()-touched region
regioninlocalβs type (kind), emit adrop_of_var_derefs_origin(local, origin)fact. - emit_
facts π - When requested, emit most of the facts needed by polonius:
- emit_
move_ πfacts - Emit facts needed for move/init analysis: moves and assignments.
- emit_
outlives_ πfacts - Emit facts about the outlives constraints: the
subsetbase relation, i.e. not a transitive closure. - emit_
universal_ πregion_ facts - Emit universal regions facts, and their relations.
- write_
row