about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-07-01 17:06:00 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-07-12 00:38:40 -0400
commit3c30415e96b2152ce0c1e0474d3e7be0e597abc0 (patch)
treea713a5876a459b959652fdeb4b18bdd3018dc4df
parent28c483b9462327bcda109e327251b5800ceb3fe5 (diff)
downloadrust-3c30415e96b2152ce0c1e0474d3e7be0e597abc0.tar.gz
rust-3c30415e96b2152ce0c1e0474d3e7be0e597abc0.zip
rename `graph` to `control_flow_graph::implementation`
-rw-r--r--src/librustc/cfg/construct.rs4
-rw-r--r--src/librustc/cfg/mod.rs2
-rw-r--r--src/librustc/dep_graph/query.rs4
-rw-r--r--src/librustc/infer/lexical_region_resolve/mod.rs10
-rw-r--r--src/librustc/middle/dataflow.rs2
-rw-r--r--src/librustc_data_structures/control_flow_graph/implementation/mod.rs (renamed from src/librustc_data_structures/graph/mod.rs)0
-rw-r--r--src/librustc_data_structures/control_flow_graph/implementation/tests.rs (renamed from src/librustc_data_structures/graph/tests.rs)0
-rw-r--r--src/librustc_data_structures/control_flow_graph/mod.rs1
-rw-r--r--src/librustc_data_structures/lib.rs1
-rw-r--r--src/librustc_incremental/assert_dep_graph.rs4
10 files changed, 16 insertions, 12 deletions
diff --git a/src/librustc/cfg/construct.rs b/src/librustc/cfg/construct.rs
index f52d201abec..9712a4aa0f8 100644
--- a/src/librustc/cfg/construct.rs
+++ b/src/librustc/cfg/construct.rs
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use rustc_data_structures::graph;
 use cfg::*;
 use middle::region;
-use ty::{self, TyCtxt};
+use rustc_data_structures::control_flow_graph::implementation as graph;
 use syntax::ptr::P;
+use ty::{self, TyCtxt};
 
 use hir::{self, PatKind};
 use hir::def_id::DefId;
diff --git a/src/librustc/cfg/mod.rs b/src/librustc/cfg/mod.rs
index b379d3956e9..70e86c454f7 100644
--- a/src/librustc/cfg/mod.rs
+++ b/src/librustc/cfg/mod.rs
@@ -11,7 +11,7 @@
 //! Module that constructs a control-flow graph representing an item.
 //! Uses `Graph` as the underlying representation.
 
-use rustc_data_structures::graph;
+use rustc_data_structures::control_flow_graph::implementation as graph;
 use ty::TyCtxt;
 use hir;
 use hir::def_id::DefId;
diff --git a/src/librustc/dep_graph/query.rs b/src/librustc/dep_graph/query.rs
index ea83a4f8b31..c877a8b9bf8 100644
--- a/src/librustc/dep_graph/query.rs
+++ b/src/librustc/dep_graph/query.rs
@@ -9,7 +9,9 @@
 // except according to those terms.
 
 use rustc_data_structures::fx::FxHashMap;
-use rustc_data_structures::graph::{Direction, INCOMING, Graph, NodeIndex, OUTGOING};
+use rustc_data_structures::control_flow_graph::implementation::{
+    Direction, INCOMING, Graph, NodeIndex, OUTGOING
+};
 
 use super::DepNode;
 
diff --git a/src/librustc/infer/lexical_region_resolve/mod.rs b/src/librustc/infer/lexical_region_resolve/mod.rs
index 5984a831e6f..fff1550fdbf 100644
--- a/src/librustc/infer/lexical_region_resolve/mod.rs
+++ b/src/librustc/infer/lexical_region_resolve/mod.rs
@@ -20,7 +20,7 @@ use infer::region_constraints::VerifyBound;
 use middle::free_region::RegionRelations;
 use rustc_data_structures::indexed_vec::{Idx, IndexVec};
 use rustc_data_structures::fx::FxHashSet;
-use rustc_data_structures::graph::{self, Direction, NodeIndex, OUTGOING};
+use rustc_data_structures::control_flow_graph::implementation::{Graph, Direction, NodeIndex, INCOMING, OUTGOING};
 use std::fmt;
 use std::u32;
 use ty::{self, TyCtxt};
@@ -99,7 +99,7 @@ struct RegionAndOrigin<'tcx> {
     origin: SubregionOrigin<'tcx>,
 }
 
-type RegionGraph<'tcx> = graph::Graph<(), Constraint<'tcx>>;
+type RegionGraph<'tcx> = Graph<(), Constraint<'tcx>>;
 
 struct LexicalResolver<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
     region_rels: &'cx RegionRelations<'cx, 'gcx, 'tcx>,
@@ -501,7 +501,7 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
     fn construct_graph(&self) -> RegionGraph<'tcx> {
         let num_vars = self.num_vars();
 
-        let mut graph = graph::Graph::new();
+        let mut graph = Graph::new();
 
         for _ in 0..num_vars {
             graph.add_node(());
@@ -550,9 +550,9 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
         // Errors in expanding nodes result from a lower-bound that is
         // not contained by an upper-bound.
         let (mut lower_bounds, lower_dup) =
-            self.collect_concrete_regions(graph, node_idx, graph::INCOMING, dup_vec);
+            self.collect_concrete_regions(graph, node_idx, INCOMING, dup_vec);
         let (mut upper_bounds, upper_dup) =
-            self.collect_concrete_regions(graph, node_idx, graph::OUTGOING, dup_vec);
+            self.collect_concrete_regions(graph, node_idx, OUTGOING, dup_vec);
 
         if lower_dup || upper_dup {
             return;
diff --git a/src/librustc/middle/dataflow.rs b/src/librustc/middle/dataflow.rs
index 5c86554f907..78e8f5f9ef3 100644
--- a/src/librustc/middle/dataflow.rs
+++ b/src/librustc/middle/dataflow.rs
@@ -22,7 +22,7 @@ use std::mem;
 use std::usize;
 use syntax::print::pprust::PrintState;
 
-use rustc_data_structures::graph::OUTGOING;
+use rustc_data_structures::control_flow_graph::implementation::OUTGOING;
 
 use util::nodemap::FxHashMap;
 use hir;
diff --git a/src/librustc_data_structures/graph/mod.rs b/src/librustc_data_structures/control_flow_graph/implementation/mod.rs
index e2b393071ff..e2b393071ff 100644
--- a/src/librustc_data_structures/graph/mod.rs
+++ b/src/librustc_data_structures/control_flow_graph/implementation/mod.rs
diff --git a/src/librustc_data_structures/graph/tests.rs b/src/librustc_data_structures/control_flow_graph/implementation/tests.rs
index 007704357af..007704357af 100644
--- a/src/librustc_data_structures/graph/tests.rs
+++ b/src/librustc_data_structures/control_flow_graph/implementation/tests.rs
diff --git a/src/librustc_data_structures/control_flow_graph/mod.rs b/src/librustc_data_structures/control_flow_graph/mod.rs
index cfb4b07b505..bd933e57b39 100644
--- a/src/librustc_data_structures/control_flow_graph/mod.rs
+++ b/src/librustc_data_structures/control_flow_graph/mod.rs
@@ -11,6 +11,7 @@
 use super::indexed_vec::Idx;
 
 pub mod dominators;
+pub mod implementation;
 pub mod iterate;
 mod reference;
 
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index e4d0bc596cb..59b7b430083 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -59,7 +59,6 @@ pub mod small_vec;
 pub mod base_n;
 pub mod bitslice;
 pub mod bitvec;
-pub mod graph;
 pub mod indexed_set;
 pub mod indexed_vec;
 pub mod obligation_forest;
diff --git a/src/librustc_incremental/assert_dep_graph.rs b/src/librustc_incremental/assert_dep_graph.rs
index c317d31b95a..39cb952a385 100644
--- a/src/librustc_incremental/assert_dep_graph.rs
+++ b/src/librustc_incremental/assert_dep_graph.rs
@@ -49,7 +49,9 @@ use rustc::dep_graph::debug::{DepNodeFilter, EdgeFilter};
 use rustc::hir::def_id::DefId;
 use rustc::ty::TyCtxt;
 use rustc_data_structures::fx::FxHashSet;
-use rustc_data_structures::graph::{Direction, INCOMING, OUTGOING, NodeIndex};
+use rustc_data_structures::control_flow_graph::implementation::{
+    Direction, INCOMING, OUTGOING, NodeIndex
+};
 use rustc::hir;
 use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor};
 use rustc::ich::{ATTR_IF_THIS_CHANGED, ATTR_THEN_THIS_WOULD_NEED};