Skip to main contentModule dump
Source use std::io; π use rustc_data_structures::fx::FxHashSet; π use rustc_data_structures::fx::FxIndexMap; π use rustc_data_structures::fx::FxIndexSet; π use rustc_index::IndexVec; π use rustc_middle::mir::pretty::MirDumper; π use rustc_middle::mir::pretty::PassWhere; π use rustc_middle::mir::pretty::PrettyPrintMirOptions; π use rustc_middle::mir::Body; π use rustc_middle::mir::Location; π use rustc_middle::ty::RegionVid; π use rustc_middle::ty::TyCtxt; π use rustc_mir_dataflow::points::DenseLocationMap; π use rustc_mir_dataflow::points::PointIndex; π use rustc_session::config::MirIncludeSpans; π use crate::borrow_set::BorrowSet; π use crate::constraints::OutlivesConstraint; π use crate::dataflow::BorrowIndex; π use crate::polonius::liveness::RegionLiveness; π use crate::polonius::LiveRegionVariances; π use crate::polonius::LivenessSource; π use crate::polonius::LocalizedConstraintGraphVisitor; π use crate::polonius::LocalizedNode; π use crate::polonius::PoloniusContext; π use crate::region_infer::values::LivenessValues; π use crate::type_check::Locations; π use crate::universal_regions::UniversalRegions; π use crate::BorrowckInferCtxt; π use crate::ClosureRegionRequirements; π use crate::RegionInferenceContext; π
- CachedLivenessSource π
- A
LivenessSource for already-existing liveness and variance data. - LocalizedOutlivesConstraint π
- The constraints weβll dump as text or a mermaid graph.
- MirDumpCollector π
- Visitor to record constraints encountered when traversing the localized constraint graph, as
well as the reachability of each loan.
- TEMPLATE π
- The polonius MIR dump template: a regular HTML file for easy editing, with special dummy
sections to be replaced by real contents.
- dump_polonius_mir π
-Zdump-mir=polonius dumps MIR annotated with NLL and polonius specific information.- emit_html_mir π
- Emits the polonius MIR, as escaped HTML.
- emit_loan_reachability π
- Emits the reachability of loans: a list of all nodes reached while traversing the polonius
constraint graph.
- emit_mermaid_cfg π
- Emits a mermaid flowchart of the CFG blocks and edges, similar to the graphviz version.
- emit_mermaid_constraint_graph π
- Emits a mermaid flowchart of the polonius localized outlives constraints, with subgraphs per
region, and loan introductions.
- emit_mermaid_nll_regions π
- Emits a mermaid flowchart of the NLL regions and the outlives constraints between them, similar
to the graphviz version.
- emit_mermaid_nll_sccs π
- Emits a mermaid flowchart of the NLL SCCs and the outlives constraints between them, similar
to the graphviz version.
- emit_polonius_dump π
- The polonius dump consists of:
- emit_polonius_mir π
- Produces the actual NLL + Polonius MIR sections to emit during the dumping process.
- location_name π
- A MIR location looks like
bb5[2]. As that is not a syntactically valid mermaid node id,
transform it into BB5_2. - node_name π
- region_name π
- render_region π
- Emits a regionβs label: index, universe, external name.