Expand description
Logic for lowering higher-kinded outlives constraints (with placeholders and universes) and turn them into regular outlives constraints.
Re-exportsΒ§
use rustc_data_structures::frozen::Frozen;πuse rustc_data_structures::fx::FxIndexMap;πuse rustc_data_structures::graph::scc;πuse rustc_data_structures::graph::scc::Sccs;πuse rustc_index::IndexVec;πuse rustc_infer::infer::RegionVariableOrigin;πuse rustc_middle::mir::ConstraintCategory;πuse rustc_middle::ty::RegionVid;πuse rustc_middle::ty::UniverseIndex;πuse tracing::debug;πuse tracing::trace;πuse crate::constraints::ConstraintSccIndex;πuse crate::constraints::OutlivesConstraintSet;πuse crate::consumers::OutlivesConstraint;πuse crate::diagnostics::UniverseInfo;πuse crate::region_infer::values::LivenessValues;πuse crate::region_infer::values::PlaceholderIndices;πuse crate::region_infer::ConstraintSccs;πuse crate::region_infer::RegionDefinition;πuse crate::region_infer::Representative;πuse crate::region_infer::TypeTest;πuse crate::ty::VarianceDiagInfo;πuse crate::type_check::free_region_relations::UniversalRegionRelations;πuse crate::type_check::Locations;πuse crate::type_check::MirTypeckRegionConstraints;πuse crate::universal_regions::UniversalRegions;πuse crate::BorrowckInferCtxt;πuse crate::NllRegionVariableOrigin;π
StructsΒ§
- Lowered
Constraints π - A set of outlives constraints after rewriting to remove higher-kinded constraints.
- Placeholder
Reachability π - Region
Tracker π - An annotation for region graph SCCs that tracks the values of its elements. This annotates a single SCC.
- SccAnnotations π
- A Visitor for SCC annotation construction.
FunctionsΒ§
- compute_
sccs_ πapplying_ placeholder_ outlives_ constraints - This method handles placeholders by rewriting the constraint graph. For each strongly connected component in the constraint graph such that there is a series of constraints A: B: C: β¦ : X where A contains a placeholder whose universe cannot be named by X, add a constraint that X: βstatic. This is a safe upper bound in the face of borrow checker/trait solver limitations that will eventually go away.
- region_
definitions π - Determines if the region variable definitions contain placeholders, and compute them for later use.
- rewrite_
placeholder_ πoutlives