Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions compiler/rustc_borrowck/src/constraints/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use rustc_data_structures::graph::scc::Sccs;
use crate::type_check::Locations;
use rustc_index::{IndexSlice, IndexVec};
use rustc_middle::mir::ConstraintCategory;
use rustc_middle::ty::{RegionVid, TyCtxt, VarianceDiagInfo};
use rustc_span::Span;
use std::fmt;
use std::ops::Index;

use crate::type_check::Locations;

pub(crate) mod graph;

/// A set of NLL region constraints. These include "outlives"
Expand Down Expand Up @@ -45,18 +43,6 @@ impl<'tcx> OutlivesConstraintSet<'tcx> {
graph::ConstraintGraph::new(graph::Reverse, self, num_region_vars)
}

/// Computes cycles (SCCs) in the graph of regions. In particular,
/// find all regions R1, R2 such that R1: R2 and R2: R1 and group
/// them into an SCC, and find the relationships between SCCs.
pub(crate) fn compute_sccs(
&self,
constraint_graph: &graph::NormalConstraintGraph,
static_region: RegionVid,
) -> Sccs<RegionVid, ConstraintSccIndex> {
let region_graph = &constraint_graph.region_graph(self, static_region);
Sccs::new(region_graph)
}

pub(crate) fn outlives(
&self,
) -> &IndexSlice<OutlivesConstraintIndex, OutlivesConstraint<'tcx>> {
Expand Down
Loading