From 90c90ba542635c3f2d1da71cb42569b6e7eeb6a9 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 2 Jul 2018 06:14:49 -0400 Subject: [PATCH] rename `control_flow_graph` to `graph` --- src/librustc/cfg/construct.rs | 2 +- src/librustc/cfg/mod.rs | 2 +- src/librustc/dep_graph/query.rs | 2 +- .../infer/lexical_region_resolve/mod.rs | 2 +- src/librustc/middle/dataflow.rs | 2 +- src/librustc/mir/mod.rs | 20 +++++++++---------- src/librustc_codegen_llvm/mir/analyze.rs | 2 +- .../dominators/mod.rs | 0 .../dominators/test.rs | 0 .../implementation/mod.rs | 0 .../implementation/tests.rs | 0 .../iterate/mod.rs | 0 .../iterate/test.rs | 0 .../{control_flow_graph => graph}/mod.rs | 0 .../reference.rs | 0 .../{control_flow_graph => graph}/test.rs | 0 src/librustc_data_structures/lib.rs | 2 +- src/librustc_incremental/assert_dep_graph.rs | 2 +- src/librustc_mir/borrow_check/mod.rs | 2 +- .../borrow_check/nll/invalidation.rs | 2 +- src/librustc_mir/borrow_check/path_utils.rs | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) rename src/librustc_data_structures/{control_flow_graph => graph}/dominators/mod.rs (100%) rename src/librustc_data_structures/{control_flow_graph => graph}/dominators/test.rs (100%) rename src/librustc_data_structures/{control_flow_graph => graph}/implementation/mod.rs (100%) rename src/librustc_data_structures/{control_flow_graph => graph}/implementation/tests.rs (100%) rename src/librustc_data_structures/{control_flow_graph => graph}/iterate/mod.rs (100%) rename src/librustc_data_structures/{control_flow_graph => graph}/iterate/test.rs (100%) rename src/librustc_data_structures/{control_flow_graph => graph}/mod.rs (100%) rename src/librustc_data_structures/{control_flow_graph => graph}/reference.rs (100%) rename src/librustc_data_structures/{control_flow_graph => graph}/test.rs (100%) diff --git a/src/librustc/cfg/construct.rs b/src/librustc/cfg/construct.rs index 9712a4aa0f8..aab70456dc1 100644 --- a/src/librustc/cfg/construct.rs +++ b/src/librustc/cfg/construct.rs @@ -10,7 +10,7 @@ use cfg::*; use middle::region; -use rustc_data_structures::control_flow_graph::implementation as graph; +use rustc_data_structures::graph::implementation as graph; use syntax::ptr::P; use ty::{self, TyCtxt}; diff --git a/src/librustc/cfg/mod.rs b/src/librustc/cfg/mod.rs index 70e86c454f7..cf9c24cc58a 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::control_flow_graph::implementation as graph; +use rustc_data_structures::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 c877a8b9bf8..ce0b5557a34 100644 --- a/src/librustc/dep_graph/query.rs +++ b/src/librustc/dep_graph/query.rs @@ -9,7 +9,7 @@ // except according to those terms. use rustc_data_structures::fx::FxHashMap; -use rustc_data_structures::control_flow_graph::implementation::{ +use rustc_data_structures::graph::implementation::{ Direction, INCOMING, Graph, NodeIndex, OUTGOING }; diff --git a/src/librustc/infer/lexical_region_resolve/mod.rs b/src/librustc/infer/lexical_region_resolve/mod.rs index fff1550fdbf..120b45ec01e 100644 --- a/src/librustc/infer/lexical_region_resolve/mod.rs +++ b/src/librustc/infer/lexical_region_resolve/mod.rs @@ -20,7 +20,7 @@ use middle::free_region::RegionRelations; use rustc_data_structures::indexed_vec::{Idx, IndexVec}; use rustc_data_structures::fx::FxHashSet; -use rustc_data_structures::control_flow_graph::implementation::{Graph, Direction, NodeIndex, INCOMING, OUTGOING}; +use rustc_data_structures::graph::implementation::{Graph, Direction, NodeIndex, INCOMING, OUTGOING}; use std::fmt; use std::u32; use ty::{self, TyCtxt}; diff --git a/src/librustc/middle/dataflow.rs b/src/librustc/middle/dataflow.rs index 78e8f5f9ef3..b949fd02126 100644 --- a/src/librustc/middle/dataflow.rs +++ b/src/librustc/middle/dataflow.rs @@ -22,7 +22,7 @@ use std::usize; use syntax::print::pprust::PrintState; -use rustc_data_structures::control_flow_graph::implementation::OUTGOING; +use rustc_data_structures::graph::implementation::OUTGOING; use util::nodemap::FxHashMap; use hir; diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index 1ce5742b464..ea6ddd9e55a 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -21,9 +21,9 @@ use mir::visit::MirVisitable; use rustc_apfloat::ieee::{Double, Single}; use rustc_apfloat::Float; -use rustc_data_structures::control_flow_graph::dominators::{dominators, Dominators}; -use rustc_data_structures::control_flow_graph; -use rustc_data_structures::control_flow_graph::{GraphPredecessors, GraphSuccessors}; +use rustc_data_structures::graph::dominators::{dominators, Dominators}; +use rustc_data_structures::graph; +use rustc_data_structures::graph::{GraphPredecessors, GraphSuccessors}; use rustc_data_structures::indexed_vec::{Idx, IndexVec}; use rustc_data_structures::small_vec::SmallVec; use rustc_data_structures::sync::Lrc; @@ -2289,23 +2289,23 @@ fn item_path_str(def_id: DefId) -> String { ty::tls::with(|tcx| tcx.item_path_str(def_id)) } -impl<'tcx> control_flow_graph::DirectedGraph for Mir<'tcx> { +impl<'tcx> graph::DirectedGraph for Mir<'tcx> { type Node = BasicBlock; } -impl<'tcx> control_flow_graph::WithNumNodes for Mir<'tcx> { +impl<'tcx> graph::WithNumNodes for Mir<'tcx> { fn num_nodes(&self) -> usize { self.basic_blocks.len() } } -impl<'tcx> control_flow_graph::WithStartNode for Mir<'tcx> { +impl<'tcx> graph::WithStartNode for Mir<'tcx> { fn start_node(&self) -> Self::Node { START_BLOCK } } -impl<'tcx> control_flow_graph::WithPredecessors for Mir<'tcx> { +impl<'tcx> graph::WithPredecessors for Mir<'tcx> { fn predecessors<'graph>( &'graph self, node: Self::Node, @@ -2314,7 +2314,7 @@ fn predecessors<'graph>( } } -impl<'tcx> control_flow_graph::WithSuccessors for Mir<'tcx> { +impl<'tcx> graph::WithSuccessors for Mir<'tcx> { fn successors<'graph>( &'graph self, node: Self::Node, @@ -2323,12 +2323,12 @@ fn successors<'graph>( } } -impl<'a, 'b> control_flow_graph::GraphPredecessors<'b> for Mir<'a> { +impl<'a, 'b> graph::GraphPredecessors<'b> for Mir<'a> { type Item = BasicBlock; type Iter = IntoIter; } -impl<'a, 'b> control_flow_graph::GraphSuccessors<'b> for Mir<'a> { +impl<'a, 'b> graph::GraphSuccessors<'b> for Mir<'a> { type Item = BasicBlock; type Iter = iter::Cloned>; } diff --git a/src/librustc_codegen_llvm/mir/analyze.rs b/src/librustc_codegen_llvm/mir/analyze.rs index 9e5298eb736..efd829c283f 100644 --- a/src/librustc_codegen_llvm/mir/analyze.rs +++ b/src/librustc_codegen_llvm/mir/analyze.rs @@ -12,7 +12,7 @@ //! which do not. use rustc_data_structures::bitvec::BitVector; -use rustc_data_structures::control_flow_graph::dominators::Dominators; +use rustc_data_structures::graph::dominators::Dominators; use rustc_data_structures::indexed_vec::{Idx, IndexVec}; use rustc::mir::{self, Location, TerminatorKind}; use rustc::mir::visit::{Visitor, PlaceContext}; diff --git a/src/librustc_data_structures/control_flow_graph/dominators/mod.rs b/src/librustc_data_structures/graph/dominators/mod.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/dominators/mod.rs rename to src/librustc_data_structures/graph/dominators/mod.rs diff --git a/src/librustc_data_structures/control_flow_graph/dominators/test.rs b/src/librustc_data_structures/graph/dominators/test.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/dominators/test.rs rename to src/librustc_data_structures/graph/dominators/test.rs diff --git a/src/librustc_data_structures/control_flow_graph/implementation/mod.rs b/src/librustc_data_structures/graph/implementation/mod.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/implementation/mod.rs rename to src/librustc_data_structures/graph/implementation/mod.rs diff --git a/src/librustc_data_structures/control_flow_graph/implementation/tests.rs b/src/librustc_data_structures/graph/implementation/tests.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/implementation/tests.rs rename to src/librustc_data_structures/graph/implementation/tests.rs diff --git a/src/librustc_data_structures/control_flow_graph/iterate/mod.rs b/src/librustc_data_structures/graph/iterate/mod.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/iterate/mod.rs rename to src/librustc_data_structures/graph/iterate/mod.rs diff --git a/src/librustc_data_structures/control_flow_graph/iterate/test.rs b/src/librustc_data_structures/graph/iterate/test.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/iterate/test.rs rename to src/librustc_data_structures/graph/iterate/test.rs diff --git a/src/librustc_data_structures/control_flow_graph/mod.rs b/src/librustc_data_structures/graph/mod.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/mod.rs rename to src/librustc_data_structures/graph/mod.rs diff --git a/src/librustc_data_structures/control_flow_graph/reference.rs b/src/librustc_data_structures/graph/reference.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/reference.rs rename to src/librustc_data_structures/graph/reference.rs diff --git a/src/librustc_data_structures/control_flow_graph/test.rs b/src/librustc_data_structures/graph/test.rs similarity index 100% rename from src/librustc_data_structures/control_flow_graph/test.rs rename to src/librustc_data_structures/graph/test.rs diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 59b7b430083..c4e04c75831 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -70,7 +70,7 @@ pub use ena::unify; pub mod fx; pub mod tuple_slice; -pub mod control_flow_graph; +pub mod graph; pub mod flock; pub mod sync; pub mod owning_ref; diff --git a/src/librustc_incremental/assert_dep_graph.rs b/src/librustc_incremental/assert_dep_graph.rs index 39cb952a385..a78a2008eec 100644 --- a/src/librustc_incremental/assert_dep_graph.rs +++ b/src/librustc_incremental/assert_dep_graph.rs @@ -49,7 +49,7 @@ use rustc::hir::def_id::DefId; use rustc::ty::TyCtxt; use rustc_data_structures::fx::FxHashSet; -use rustc_data_structures::control_flow_graph::implementation::{ +use rustc_data_structures::graph::implementation::{ Direction, INCOMING, OUTGOING, NodeIndex }; use rustc::hir; diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs index a5db0d15d8a..377b6475891 100644 --- a/src/librustc_mir/borrow_check/mod.rs +++ b/src/librustc_mir/borrow_check/mod.rs @@ -23,7 +23,7 @@ use rustc::ty::query::Providers; use rustc::ty::{self, ParamEnv, TyCtxt}; -use rustc_data_structures::control_flow_graph::dominators::Dominators; +use rustc_data_structures::graph::dominators::Dominators; use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::indexed_set::IdxSetBuf; use rustc_data_structures::indexed_vec::Idx; diff --git a/src/librustc_mir/borrow_check/nll/invalidation.rs b/src/librustc_mir/borrow_check/nll/invalidation.rs index 46026cdc941..301999cc4a5 100644 --- a/src/librustc_mir/borrow_check/nll/invalidation.rs +++ b/src/librustc_mir/borrow_check/nll/invalidation.rs @@ -29,7 +29,7 @@ use rustc::mir::{Field, Operand, BorrowKind}; use rustc::ty::{self, ParamEnv}; use rustc_data_structures::indexed_vec::Idx; -use rustc_data_structures::control_flow_graph::dominators::Dominators; +use rustc_data_structures::graph::dominators::Dominators; pub(super) fn generate_invalidates<'cx, 'gcx, 'tcx>( infcx: &InferCtxt<'cx, 'gcx, 'tcx>, diff --git a/src/librustc_mir/borrow_check/path_utils.rs b/src/librustc_mir/borrow_check/path_utils.rs index ca2a120ceb7..499170acee3 100644 --- a/src/librustc_mir/borrow_check/path_utils.rs +++ b/src/librustc_mir/borrow_check/path_utils.rs @@ -16,7 +16,7 @@ use rustc::mir::{BasicBlock, Location, Mir, Place}; use rustc::mir::{ProjectionElem, BorrowKind}; use rustc::ty::TyCtxt; -use rustc_data_structures::control_flow_graph::dominators::Dominators; +use rustc_data_structures::graph::dominators::Dominators; /// Returns true if the borrow represented by `kind` is /// allowed to be split into separate Reservation and -- 2.44.0