about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2019-06-05 10:17:30 -0400
committerNiko Matsakis <niko@alum.mit.edu>2019-07-02 12:15:20 -0400
commit6ead1c869944b3d1cafd0ea73aa26939e95be117 (patch)
tree1d92522d13773491da0a056b771b87fcd6faf7aa
parentddc63ce19ffa87825b000e47294e9ec05e223126 (diff)
downloadrust-6ead1c869944b3d1cafd0ea73aa26939e95be117.tar.gz
rust-6ead1c869944b3d1cafd0ea73aa26939e95be117.zip
rename `ConstraintSet` to `OutlivesConstraintSet`
-rw-r--r--src/librustc_mir/borrow_check/nll/constraints/graph.rs14
-rw-r--r--src/librustc_mir/borrow_check/nll/constraints/mod.rs10
-rw-r--r--src/librustc_mir/borrow_check/nll/region_infer/mod.rs6
-rw-r--r--src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs4
-rw-r--r--src/librustc_mir/borrow_check/nll/type_check/mod.rs6
5 files changed, 20 insertions, 20 deletions
diff --git a/src/librustc_mir/borrow_check/nll/constraints/graph.rs b/src/librustc_mir/borrow_check/nll/constraints/graph.rs
index 78d49309d02..1d9e6064c41 100644
--- a/src/librustc_mir/borrow_check/nll/constraints/graph.rs
+++ b/src/librustc_mir/borrow_check/nll/constraints/graph.rs
@@ -1,6 +1,6 @@
 use crate::borrow_check::nll::type_check::Locations;
 use crate::borrow_check::nll::constraints::OutlivesConstraintIndex;
-use crate::borrow_check::nll::constraints::{ConstraintSet, OutlivesConstraint};
+use crate::borrow_check::nll::constraints::{OutlivesConstraintSet, OutlivesConstraint};
 use rustc::mir::ConstraintCategory;
 use rustc::ty::RegionVid;
 use rustc_data_structures::graph;
@@ -77,7 +77,7 @@ impl<D: ConstraintGraphDirecton> ConstraintGraph<D> {
     /// reporting.
     crate fn new(
         direction: D,
-        set: &ConstraintSet,
+        set: &OutlivesConstraintSet,
         num_region_vars: usize,
     ) -> Self {
         let mut first_constraints = IndexVec::from_elem_n(None, num_region_vars);
@@ -103,7 +103,7 @@ impl<D: ConstraintGraphDirecton> ConstraintGraph<D> {
     /// and not constraints.
     crate fn region_graph<'rg>(
         &'rg self,
-        set: &'rg ConstraintSet,
+        set: &'rg OutlivesConstraintSet,
         static_region: RegionVid,
     ) -> RegionGraph<'rg, D> {
         RegionGraph::new(set, self, static_region)
@@ -113,7 +113,7 @@ impl<D: ConstraintGraphDirecton> ConstraintGraph<D> {
     crate fn outgoing_edges<'a>(
         &'a self,
         region_sup: RegionVid,
-        constraints: &'a ConstraintSet,
+        constraints: &'a OutlivesConstraintSet,
         static_region: RegionVid,
     ) -> Edges<'a, D> {
         //if this is the `'static` region and the graph's direction is normal,
@@ -142,7 +142,7 @@ impl<D: ConstraintGraphDirecton> ConstraintGraph<D> {
 
 crate struct Edges<'s, D: ConstraintGraphDirecton> {
     graph: &'s ConstraintGraph<D>,
-    constraints: &'s ConstraintSet,
+    constraints: &'s OutlivesConstraintSet,
     pointer: Option<OutlivesConstraintIndex>,
     next_static_idx: Option<usize>,
     static_region: RegionVid,
@@ -180,7 +180,7 @@ impl<'s, D: ConstraintGraphDirecton> Iterator for Edges<'s, D> {
 /// reverse) constraint graph. It implements the graph traits and is
 /// usd for doing the SCC computation.
 crate struct RegionGraph<'s, D: ConstraintGraphDirecton> {
-    set: &'s ConstraintSet,
+    set: &'s OutlivesConstraintSet,
     constraint_graph: &'s ConstraintGraph<D>,
     static_region: RegionVid,
 }
@@ -191,7 +191,7 @@ impl<'s, D: ConstraintGraphDirecton> RegionGraph<'s, D> {
     /// construct SCCs for region inference but also for error
     /// reporting.
     crate fn new(
-        set: &'s ConstraintSet,
+        set: &'s OutlivesConstraintSet,
         constraint_graph: &'s ConstraintGraph<D>,
         static_region: RegionVid,
     ) -> Self {
diff --git a/src/librustc_mir/borrow_check/nll/constraints/mod.rs b/src/librustc_mir/borrow_check/nll/constraints/mod.rs
index 727e573f1a1..6121ed0cf0d 100644
--- a/src/librustc_mir/borrow_check/nll/constraints/mod.rs
+++ b/src/librustc_mir/borrow_check/nll/constraints/mod.rs
@@ -13,14 +13,14 @@ crate mod graph;
 /// a unique `OutlivesConstraintIndex` and you can index into the set
 /// (`constraint_set[i]`) to access the constraint details.
 #[derive(Clone, Default)]
-crate struct ConstraintSet {
+crate struct OutlivesConstraintSet {
     outlives: IndexVec<OutlivesConstraintIndex, OutlivesConstraint>,
 }
 
-impl ConstraintSet {
+impl OutlivesConstraintSet {
     crate fn push(&mut self, constraint: OutlivesConstraint) {
         debug!(
-            "ConstraintSet::push({:?}: {:?} @ {:?}",
+            "OutlivesConstraintSet::push({:?}: {:?} @ {:?}",
             constraint.sup, constraint.sub, constraint.locations
         );
         if constraint.sup == constraint.sub {
@@ -34,7 +34,7 @@ impl ConstraintSet {
     /// easy to find the constraints affecting a particular region.
     ///
     /// N.B., this graph contains a "frozen" view of the current
-    /// constraints. Any new constraints added to the `ConstraintSet`
+    /// constraints. Any new constraints added to the `OutlivesConstraintSet`
     /// after the graph is built will not be present in the graph.
     crate fn graph(&self, num_region_vars: usize) -> graph::NormalConstraintGraph {
         graph::ConstraintGraph::new(graph::Normal, self, num_region_vars)
@@ -63,7 +63,7 @@ impl ConstraintSet {
     }
 }
 
-impl Index<OutlivesConstraintIndex> for ConstraintSet {
+impl Index<OutlivesConstraintIndex> for OutlivesConstraintSet {
     type Output = OutlivesConstraint;
 
     fn index(&self, i: OutlivesConstraintIndex) -> &Self::Output {
diff --git a/src/librustc_mir/borrow_check/nll/region_infer/mod.rs b/src/librustc_mir/borrow_check/nll/region_infer/mod.rs
index 5a56e8ba186..4a44c41eb81 100644
--- a/src/librustc_mir/borrow_check/nll/region_infer/mod.rs
+++ b/src/librustc_mir/borrow_check/nll/region_infer/mod.rs
@@ -1,6 +1,6 @@
 use super::universal_regions::UniversalRegions;
 use crate::borrow_check::nll::constraints::graph::NormalConstraintGraph;
-use crate::borrow_check::nll::constraints::{ConstraintSccIndex, ConstraintSet, OutlivesConstraint};
+use crate::borrow_check::nll::constraints::{ConstraintSccIndex, OutlivesConstraintSet, OutlivesConstraint};
 use crate::borrow_check::nll::region_infer::values::{
     PlaceholderIndices, RegionElement, ToElementIndex
 };
@@ -49,7 +49,7 @@ pub struct RegionInferenceContext<'tcx> {
     liveness_constraints: LivenessValues<RegionVid>,
 
     /// The outlives constraints computed by the type-check.
-    constraints: Rc<ConstraintSet>,
+    constraints: Rc<OutlivesConstraintSet>,
 
     /// The constraint-set, but in graph form, making it easy to traverse
     /// the constraints adjacent to a particular region. Used to construct
@@ -186,7 +186,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
         placeholder_indices: Rc<PlaceholderIndices>,
         universal_region_relations: Rc<UniversalRegionRelations<'tcx>>,
         _body: &Body<'tcx>,
-        outlives_constraints: ConstraintSet,
+        outlives_constraints: OutlivesConstraintSet,
         closure_bounds_mapping: FxHashMap<
             Location,
             FxHashMap<(RegionVid, RegionVid), (ConstraintCategory, Span)>,
diff --git a/src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs
index 3b138bc1262..4af78fa5e0f 100644
--- a/src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs
+++ b/src/librustc_mir/borrow_check/nll/type_check/liveness/mod.rs
@@ -1,5 +1,5 @@
 use crate::borrow_check::location::LocationTable;
-use crate::borrow_check::nll::constraints::ConstraintSet;
+use crate::borrow_check::nll::constraints::OutlivesConstraintSet;
 use crate::borrow_check::nll::facts::{AllFacts, AllFactsExt};
 use crate::borrow_check::nll::region_infer::values::RegionValueElements;
 use crate::borrow_check::nll::universal_regions::UniversalRegions;
@@ -107,7 +107,7 @@ fn compute_live_locals(
 fn regions_that_outlive_free_regions(
     num_region_vars: usize,
     universal_regions: &UniversalRegions<'tcx>,
-    constraint_set: &ConstraintSet,
+    constraint_set: &OutlivesConstraintSet,
 ) -> FxHashSet<RegionVid> {
     // Build a graph of the outlives constraints thus far. This is
     // a reverse graph, so for each constraint `R1: R2` we have an
diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs
index def4132295d..221eb871dbf 100644
--- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs
+++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs
@@ -4,7 +4,7 @@
 
 use crate::borrow_check::borrow_set::BorrowSet;
 use crate::borrow_check::location::LocationTable;
-use crate::borrow_check::nll::constraints::{ConstraintSet, OutlivesConstraint};
+use crate::borrow_check::nll::constraints::{OutlivesConstraintSet, OutlivesConstraint};
 use crate::borrow_check::nll::facts::AllFacts;
 use crate::borrow_check::nll::region_infer::values::LivenessValues;
 use crate::borrow_check::nll::region_infer::values::PlaceholderIndex;
@@ -127,7 +127,7 @@ pub(crate) fn type_check<'tcx>(
         placeholder_indices: PlaceholderIndices::default(),
         placeholder_index_to_region: IndexVec::default(),
         liveness_constraints: LivenessValues::new(elements.clone()),
-        outlives_constraints: ConstraintSet::default(),
+        outlives_constraints: OutlivesConstraintSet::default(),
         closure_bounds_mapping: Default::default(),
         type_tests: Vec::default(),
     };
@@ -884,7 +884,7 @@ crate struct MirTypeckRegionConstraints<'tcx> {
     /// hence it must report on their liveness constraints.
     crate liveness_constraints: LivenessValues<RegionVid>,
 
-    crate outlives_constraints: ConstraintSet,
+    crate outlives_constraints: OutlivesConstraintSet,
 
     crate closure_bounds_mapping:
         FxHashMap<Location, FxHashMap<(RegionVid, RegionVid), (ConstraintCategory, Span)>>,