Skip to content

Commit

Permalink
rename graph to control_flow_graph::implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 12, 2018
1 parent 28c483b commit 3c30415
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/librustc/cfg/construct.rs
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/cfg/mod.rs
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/librustc/dep_graph/query.rs
Expand Up @@ -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;

Expand Down
10 changes: 5 additions & 5 deletions src/librustc/infer/lexical_region_resolve/mod.rs
Expand Up @@ -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};
Expand Down Expand Up @@ -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>,
Expand Down Expand Up @@ -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(());
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/dataflow.rs
Expand Up @@ -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;
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/librustc_data_structures/control_flow_graph/mod.rs
Expand Up @@ -11,6 +11,7 @@
use super::indexed_vec::Idx;

pub mod dominators;
pub mod implementation;
pub mod iterate;
mod reference;

Expand Down
1 change: 0 additions & 1 deletion src/librustc_data_structures/lib.rs
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/librustc_incremental/assert_dep_graph.rs
Expand Up @@ -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};
Expand Down

0 comments on commit 3c30415

Please sign in to comment.