Skip to content

Commit

Permalink
remove indexed_vec re-export from rustc_data_structures
Browse files Browse the repository at this point in the history
  • Loading branch information
csmoe committed Sep 29, 2019
1 parent d20183d commit 64f61c7
Show file tree
Hide file tree
Showing 125 changed files with 168 additions and 164 deletions.
5 changes: 4 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3342,7 +3342,6 @@ dependencies = [
name = "rustc_codegen_llvm"
version = "0.0.0"
dependencies = [
"rustc_index",
"rustc_llvm",
]

Expand Down Expand Up @@ -3519,6 +3518,7 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_index",
"rustc_target",
"syntax",
"syntax_pos",
Expand Down Expand Up @@ -3687,6 +3687,7 @@ dependencies = [
"bitflags",
"log",
"rustc_data_structures",
"rustc_index",
"serialize",
"syntax_pos",
]
Expand Down Expand Up @@ -3735,6 +3736,7 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_errors",
"rustc_index",
"rustc_target",
"smallvec",
"syntax",
Expand Down Expand Up @@ -4281,6 +4283,7 @@ dependencies = [
"arena",
"cfg-if",
"rustc_data_structures",
"rustc_index",
"rustc_macros",
"scoped-tls",
"serialize",
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ macro_rules! arena_types {
[] steal_mir: rustc::ty::steal::Steal<rustc::mir::Body<$tcx>>,
[] mir: rustc::mir::Body<$tcx>,
[] steal_promoted: rustc::ty::steal::Steal<
rustc_data_structures::indexed_vec::IndexVec<
rustc_index::vec::IndexVec<
rustc::mir::Promoted,
rustc::mir::Body<$tcx>
>
>,
[] promoted: rustc_data_structures::indexed_vec::IndexVec<
[] promoted: rustc_index::vec::IndexVec<
rustc::mir::Promoted,
rustc::mir::Body<$tcx>
>,
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/dep_graph/graph.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use errors::Diagnostic;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_index::vec::{Idx, IndexVec};
use smallvec::SmallVec;
use rustc_data_structures::sync::{Lrc, Lock, AtomicU32, Ordering};
use std::env;
Expand All @@ -26,7 +26,7 @@ pub struct DepGraph {
data: Option<Lrc<DepGraphData>>,
}

newtype_index! {
rustc_index::newtype_index! {
pub struct DepNodeIndex { .. }
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/dep_graph/serialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
use crate::dep_graph::DepNode;
use crate::ich::Fingerprint;
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
use rustc_index::vec::{IndexVec, Idx};

newtype_index! {
rustc_index::newtype_index! {
pub struct SerializedDepNodeIndex { .. }
}

Expand Down
6 changes: 3 additions & 3 deletions src/librustc/hir/def_id.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::ty::{self, TyCtxt};
use rustc_data_structures::indexed_vec::Idx;
use rustc_index::vec::Idx;
use std::fmt;
use std::u32;

newtype_index! {
rustc_index::newtype_index! {
pub struct CrateId {
ENCODABLE = custom
}
Expand Down Expand Up @@ -87,7 +87,7 @@ impl fmt::Display for CrateNum {
impl rustc_serialize::UseSpecializedEncodable for CrateNum {}
impl rustc_serialize::UseSpecializedDecodable for CrateNum {}

newtype_index! {
rustc_index::newtype_index! {
/// A DefIndex is an index into the hir-map for a crate, identifying a
/// particular definition. It should really be considered an interned
/// shorthand for a particular DefPath.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use crate::util::common::FN_OUTPUT_NAME;
use crate::util::nodemap::{DefIdMap, NodeMap};
use errors::Applicability;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_index::vec::IndexVec;
use rustc_data_structures::thin_vec::ThinVec;
use rustc_data_structures::sync::Lrc;

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/map/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::hir::map::HirEntryMap;
use crate::hir::def_id::{LOCAL_CRATE, CrateNum};
use crate::hir::intravisit::{Visitor, NestedVisitorMap};
use rustc_data_structures::svh::Svh;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_index::vec::IndexVec;
use crate::ich::Fingerprint;
use crate::middle::cstore::CrateStore;
use crate::session::CrateDisambiguator;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/map/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::session::CrateDisambiguator;
use crate::util::nodemap::NodeMap;

use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::indexed_vec::{IndexVec};
use rustc_index::vec::{IndexVec};
use rustc_data_structures::stable_hasher::StableHasher;
use std::borrow::Borrow;
use std::fmt::Write;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::util::common::time;

use rustc_target::spec::abi::Abi;
use rustc_data_structures::svh::Svh;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_index::vec::IndexVec;
use syntax::ast::{self, Name, NodeId};
use syntax::source_map::Spanned;
use syntax::ext::base::MacroKind;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ impl fmt::Display for HirId {

// Hack to ensure that we don't try to access the private parts of `ItemLocalId` in this module.
mod item_local_id_inner {
use rustc_data_structures::indexed_vec::Idx;
use rustc_index::vec::Idx;
use rustc_macros::HashStable;
newtype_index! {
rustc_index::newtype_index! {
/// An `ItemLocalId` uniquely identifies something within a given "item-like";
/// that is, within a `hir::Item`, `hir::TraitItem`, or `hir::ImplItem`. There is no
/// guarantee that the numerical value of a given `ItemLocalId` corresponds to
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/canonical/canonicalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::ty::{self, BoundVar, InferConst, List, Ty, TyCtxt, TypeFlags};
use crate::ty::flags::FlagComputation;

use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::indexed_vec::Idx;
use rustc_index::vec::Idx;
use smallvec::SmallVec;

impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/canonical/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::infer::{InferCtxt, RegionVariableOrigin, TypeVariableOrigin, TypeVari
use crate::infer::{ConstVariableOrigin, ConstVariableOriginKind};
use crate::infer::region_constraints::MemberConstraint;
use crate::mir::interpret::ConstValue;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_index::vec::IndexVec;
use rustc_macros::HashStable;
use rustc_serialize::UseSpecializedDecodable;
use smallvec::SmallVec;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/infer/canonical/query_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use crate::infer::region_constraints::{Constraint, RegionConstraintData};
use crate::infer::InferCtxtBuilder;
use crate::infer::{InferCtxt, InferOk, InferResult};
use crate::mir::interpret::ConstValue;
use rustc_data_structures::indexed_vec::Idx;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_index::vec::Idx;
use rustc_index::vec::IndexVec;
use std::fmt::Debug;
use syntax_pos::DUMMY_SP;
use crate::traits::query::{Fallible, NoSolution};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/lexical_region_resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::graph::implementation::{
Direction, Graph, NodeIndex, INCOMING, OUTGOING,
};
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_index::vec::{Idx, IndexVec};
use smallvec::SmallVec;
use std::fmt;
use syntax_pos::Span;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/region_constraints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use super::unify_key;
use super::{MiscVariable, RegionVariableOrigin, SubregionOrigin};

use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_index::vec::IndexVec;
use rustc_data_structures::sync::Lrc;
use rustc_data_structures::unify as ut;
use crate::hir::def_id::DefId;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/intrinsicck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::ty::layout::{LayoutError, Pointer, SizeSkeleton, VariantIdx};
use crate::ty::query::Providers;

use rustc_target::spec::abi::Abi::RustIntrinsic;
use rustc_data_structures::indexed_vec::Idx;
use rustc_index::vec::Idx;
use syntax_pos::{Span, sym};
use crate::hir::intravisit::{self, Visitor, NestedVisitorMap};
use crate::hir;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use crate::util::nodemap::{FxHashMap, FxHashSet};
use crate::ty::{self, DefIdTree, TyCtxt};
use crate::ty::query::Providers;

use rustc_data_structures::indexed_vec::Idx;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_index::vec::Idx;
use rustc_macros::HashStable;
use syntax::source_map;
use syntax_pos::{Span, DUMMY_SP};
Expand Down Expand Up @@ -131,7 +131,7 @@ pub enum ScopeData {
Remainder(FirstStatementIndex)
}

newtype_index! {
rustc_index::newtype_index! {
/// Represents a subscope of `block` for a binding that is introduced
/// by `block.stmts[first_statement_index]`. Such subscopes represent
/// a suffix of the block. Note that each subscope does not include
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/mir/cache.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_index::vec::IndexVec;
use rustc_data_structures::sync::{RwLock, MappedReadGuard, ReadGuard};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_serialize::{Encodable, Encoder, Decodable, Decoder};
Expand Down
14 changes: 7 additions & 7 deletions src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use rustc_index::bit_set::BitMatrix;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::graph::dominators::{dominators, Dominators};
use rustc_data_structures::graph::{self, GraphPredecessors, GraphSuccessors};
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_index::vec::{Idx, IndexVec};
use rustc_data_structures::sync::Lrc;
use rustc_data_structures::sync::MappedReadGuard;
use rustc_macros::HashStable;
Expand Down Expand Up @@ -581,7 +581,7 @@ impl BorrowKind {
///////////////////////////////////////////////////////////////////////////
// Variables and temps

newtype_index! {
rustc_index::newtype_index! {
pub struct Local {
derive [HashStable]
DEBUG_FORMAT = "_{}",
Expand Down Expand Up @@ -994,7 +994,7 @@ pub struct UpvarDebuginfo {
///////////////////////////////////////////////////////////////////////////
// BasicBlock

newtype_index! {
rustc_index::newtype_index! {
pub struct BasicBlock {
derive [HashStable]
DEBUG_FORMAT = "bb{}",
Expand Down Expand Up @@ -1832,7 +1832,7 @@ static_assert_size!(PlaceElem<'_>, 16);
/// need neither the `V` parameter for `Index` nor the `T` for `Field`.
pub type ProjectionKind = ProjectionElem<(), ()>;

newtype_index! {
rustc_index::newtype_index! {
pub struct Field {
derive [HashStable]
DEBUG_FORMAT = "field[{}]"
Expand Down Expand Up @@ -2047,7 +2047,7 @@ impl Debug for PlaceBase<'_> {
///////////////////////////////////////////////////////////////////////////
// Scopes

newtype_index! {
rustc_index::newtype_index! {
pub struct SourceScope {
derive [HashStable]
DEBUG_FORMAT = "scope[{}]",
Expand Down Expand Up @@ -2586,7 +2586,7 @@ impl<'tcx> TypeFoldable<'tcx> for UserTypeProjection {
}
}

newtype_index! {
rustc_index::newtype_index! {
pub struct Promoted {
derive [HashStable]
DEBUG_FORMAT = "promoted[{}]"
Expand Down Expand Up @@ -2743,7 +2743,7 @@ pub struct UnsafetyCheckResult {
pub unsafe_blocks: Lrc<[(hir::HirId, bool)]>,
}

newtype_index! {
rustc_index::newtype_index! {
pub struct GeneratorSavedLocal {
derive [HashStable]
DEBUG_FORMAT = "_{}",
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ rustc_queries! {
cache_on_disk_if { key.is_local() }
load_cached(tcx, id) {
let promoted: Option<
rustc_data_structures::indexed_vec::IndexVec<
rustc_index::vec::IndexVec<
crate::mir::Promoted,
crate::mir::Body<'tcx>
>> = tcx.queries.on_disk_cache.try_load_query_result(tcx, id);
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use smallvec::SmallVec;
use rustc_data_structures::stable_hasher::{
HashStable, StableHasher, StableVec, hash_stable_hashmap,
};
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_index::vec::{Idx, IndexVec};
use rustc_data_structures::sharded::ShardedHashMap;
use rustc_data_structures::sync::{Lrc, Lock, WorkerLocal};
use std::any::Any;
Expand Down Expand Up @@ -777,7 +777,7 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TypeckTables<'tcx> {
}
}

newtype_index! {
rustc_index::newtype_index! {
pub struct UserTypeAnnotationIndex {
derive [HashStable]
DEBUG_FORMAT = "UserType({})",
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use crate::mir::{GeneratorLayout, GeneratorSavedLocal};
use crate::ty::GeneratorSubsts;
use crate::ty::subst::Subst;
use rustc_index::bit_set::BitSet;
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_index::vec::{IndexVec, Idx};

pub use rustc_target::abi::*;
use rustc_target::spec::{HasTargetSpec, abi::Abi as SpecAbi};
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ use syntax_pos::Span;

use smallvec;
use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_data_structures::stable_hasher::{StableHasher, HashStable};
use rustc_index::vec::{Idx, IndexVec};

use crate::hir;

Expand Down Expand Up @@ -1536,7 +1536,7 @@ impl<'tcx> InstantiatedPredicates<'tcx> {
}
}

newtype_index! {
rustc_index::newtype_index! {
/// "Universes" are used during type- and trait-checking in the
/// presence of `for<..>` binders to control what sets of names are
/// visible. Universes are arranged into a tree: the root universe
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use crate::util::profiling::ProfileCategory::*;

use rustc_data_structures::svh::Svh;
use rustc_index::bit_set::BitSet;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_index::vec::IndexVec;
use rustc_data_structures::fx::{FxIndexMap, FxHashMap, FxHashSet};
use rustc_data_structures::stable_hasher::StableVec;
use rustc_data_structures::sync::Lrc;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/query/on_disk_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use errors::Diagnostic;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::thin_vec::ThinVec;
use rustc_data_structures::sync::{Lrc, Lock, HashMapExt, Once};
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
use rustc_index::vec::{IndexVec, Idx};
use rustc_serialize::{
Decodable, Decoder, Encodable, Encoder, SpecializedDecoder, SpecializedEncoder,
UseSpecializedDecodable, UseSpecializedEncodable, opaque,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/structural_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::mir::interpret::ConstValue;
use crate::ty::{self, Lift, Ty, TyCtxt, InferConst};
use crate::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
use crate::ty::print::{FmtPrinter, Printer};
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
use rustc_index::vec::{IndexVec, Idx};
use smallvec::SmallVec;
use crate::mir::interpret;

Expand Down
Loading

0 comments on commit 64f61c7

Please sign in to comment.