rename `graph` to `control_flow_graph::implementation`

This commit is contained in:
Niko Matsakis 2018-07-01 17:06:00 -04:00
parent 28c483b946
commit 3c30415e96
10 changed files with 16 additions and 12 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -11,6 +11,7 @@
use super::indexed_vec::Idx;
pub mod dominators;
pub mod implementation;
pub mod iterate;
mod reference;

View File

@ -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;

View File

@ -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};