From 64f61c7888c9cb2cbd7d37f87a6cbec2858ee409 Mon Sep 17 00:00:00 2001 From: csmoe Date: Thu, 26 Sep 2019 05:38:33 +0000 Subject: remove indexed_vec re-export from rustc_data_structures --- src/librustc_data_structures/graph/dominators/mod.rs | 2 +- src/librustc_data_structures/graph/iterate/mod.rs | 2 +- src/librustc_data_structures/graph/mod.rs | 2 +- src/librustc_data_structures/graph/scc/mod.rs | 2 +- src/librustc_data_structures/graph/vec_graph/mod.rs | 2 +- src/librustc_data_structures/lib.rs | 1 - src/librustc_data_structures/obligation_forest/mod.rs | 2 +- src/librustc_data_structures/stable_hasher.rs | 8 ++++---- src/librustc_data_structures/vec_linked_list.rs | 2 +- src/librustc_data_structures/work_queue.rs | 2 +- 10 files changed, 12 insertions(+), 13 deletions(-) (limited to 'src/librustc_data_structures') diff --git a/src/librustc_data_structures/graph/dominators/mod.rs b/src/librustc_data_structures/graph/dominators/mod.rs index 41e6b72953e..29a8a98d229 100644 --- a/src/librustc_data_structures/graph/dominators/mod.rs +++ b/src/librustc_data_structures/graph/dominators/mod.rs @@ -4,7 +4,7 @@ //! Rice Computer Science TS-06-33870 //! -use super::super::indexed_vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexVec}; use super::iterate::reverse_post_order; use super::ControlFlowGraph; diff --git a/src/librustc_data_structures/graph/iterate/mod.rs b/src/librustc_data_structures/graph/iterate/mod.rs index 999c5df7b86..e268b281744 100644 --- a/src/librustc_data_structures/graph/iterate/mod.rs +++ b/src/librustc_data_structures/graph/iterate/mod.rs @@ -1,4 +1,4 @@ -use super::super::indexed_vec::IndexVec; +use rustc_index::vec::IndexVec; use super::{DirectedGraph, WithNumNodes, WithSuccessors, WithStartNode}; use rustc_index::bit_set::BitSet; diff --git a/src/librustc_data_structures/graph/mod.rs b/src/librustc_data_structures/graph/mod.rs index 0a607659f3e..37335799d19 100644 --- a/src/librustc_data_structures/graph/mod.rs +++ b/src/librustc_data_structures/graph/mod.rs @@ -1,4 +1,4 @@ -use super::indexed_vec::Idx; +use rustc_index::vec::Idx; pub mod dominators; pub mod implementation; diff --git a/src/librustc_data_structures/graph/scc/mod.rs b/src/librustc_data_structures/graph/scc/mod.rs index 23a1a2a90a4..c214f66cd15 100644 --- a/src/librustc_data_structures/graph/scc/mod.rs +++ b/src/librustc_data_structures/graph/scc/mod.rs @@ -6,7 +6,7 @@ use crate::fx::FxHashSet; use crate::graph::{DirectedGraph, WithNumNodes, WithNumEdges, WithSuccessors, GraphSuccessors}; use crate::graph::vec_graph::VecGraph; -use crate::indexed_vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexVec}; use std::ops::Range; #[cfg(test)] diff --git a/src/librustc_data_structures/graph/vec_graph/mod.rs b/src/librustc_data_structures/graph/vec_graph/mod.rs index 19c61f2680d..aad5944dcd0 100644 --- a/src/librustc_data_structures/graph/vec_graph/mod.rs +++ b/src/librustc_data_structures/graph/vec_graph/mod.rs @@ -1,4 +1,4 @@ -use crate::indexed_vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexVec}; use crate::graph::{DirectedGraph, WithNumNodes, WithNumEdges, WithSuccessors, GraphSuccessors}; #[cfg(test)] diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 6a4602da36d..474a42644d9 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -37,7 +37,6 @@ extern crate libc; extern crate cfg_if; pub use rustc_serialize::hex::ToHex; -pub use rustc_index::{indexed_vec, newtype_index}; #[inline(never)] #[cold] diff --git a/src/librustc_data_structures/obligation_forest/mod.rs b/src/librustc_data_structures/obligation_forest/mod.rs index 1c7109fe500..cfccef67fe7 100644 --- a/src/librustc_data_structures/obligation_forest/mod.rs +++ b/src/librustc_data_structures/obligation_forest/mod.rs @@ -138,7 +138,7 @@ pub struct ObligationForest { /// call to `compress`. /// /// `usize` indices are used here and throughout this module, rather than - /// `newtype_index!` indices, because this code is hot enough that the + /// `rustc_index::newtype_index!` indices, because this code is hot enough that the /// `u32`-to-`usize` conversions that would be required are significant, /// and space considerations are not important. nodes: Vec>, diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs index 7f17a1aed62..ee4f6a5e785 100644 --- a/src/librustc_data_structures/stable_hasher.rs +++ b/src/librustc_data_structures/stable_hasher.rs @@ -2,7 +2,7 @@ use std::hash::{Hash, Hasher, BuildHasher}; use std::mem; use smallvec::SmallVec; use crate::sip128::SipHasher128; -use crate::indexed_vec; +use rustc_index::vec; use rustc_index::bit_set; /// When hashing something that ends up affecting properties like symbol names, @@ -429,7 +429,7 @@ impl HashStable for ::std::mem::Discriminant { } } -impl HashStable for indexed_vec::IndexVec +impl HashStable for vec::IndexVec where T: HashStable, { fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { @@ -441,14 +441,14 @@ impl HashStable for indexed_vec::IndexVec HashStable for bit_set::BitSet +impl HashStable for bit_set::BitSet { fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { self.words().hash_stable(ctx, hasher); } } -impl HashStable +impl HashStable for bit_set::BitMatrix { fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { diff --git a/src/librustc_data_structures/vec_linked_list.rs b/src/librustc_data_structures/vec_linked_list.rs index 0fb80600318..7744c30655d 100644 --- a/src/librustc_data_structures/vec_linked_list.rs +++ b/src/librustc_data_structures/vec_linked_list.rs @@ -1,4 +1,4 @@ -use crate::indexed_vec::{Idx, IndexVec}; +use rustc_index::vec::{Idx, IndexVec}; pub fn iter( first: Option, diff --git a/src/librustc_data_structures/work_queue.rs b/src/librustc_data_structures/work_queue.rs index 2c0e2261fee..af63b18e9e9 100644 --- a/src/librustc_data_structures/work_queue.rs +++ b/src/librustc_data_structures/work_queue.rs @@ -1,5 +1,5 @@ use rustc_index::bit_set::BitSet; -use crate::indexed_vec::Idx; +use rustc_index::vec::Idx; use std::collections::VecDeque; /// A work queue is a handy data structure for tracking work left to -- cgit 1.4.1-3-g733a5