Skip to content

Commit 64f61c7

Browse files
committed
remove indexed_vec re-export from rustc_data_structures
1 parent d20183d commit 64f61c7

File tree

125 files changed

+168
-164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+168
-164
lines changed

Cargo.lock

+4-1
Original file line numberDiff line numberDiff line change
@@ -3342,7 +3342,6 @@ dependencies = [
33423342
name = "rustc_codegen_llvm"
33433343
version = "0.0.0"
33443344
dependencies = [
3345-
"rustc_index",
33463345
"rustc_llvm",
33473346
]
33483347

@@ -3519,6 +3518,7 @@ dependencies = [
35193518
"log",
35203519
"rustc",
35213520
"rustc_data_structures",
3521+
"rustc_index",
35223522
"rustc_target",
35233523
"syntax",
35243524
"syntax_pos",
@@ -3687,6 +3687,7 @@ dependencies = [
36873687
"bitflags",
36883688
"log",
36893689
"rustc_data_structures",
3690+
"rustc_index",
36903691
"serialize",
36913692
"syntax_pos",
36923693
]
@@ -3735,6 +3736,7 @@ dependencies = [
37353736
"rustc",
37363737
"rustc_data_structures",
37373738
"rustc_errors",
3739+
"rustc_index",
37383740
"rustc_target",
37393741
"smallvec",
37403742
"syntax",
@@ -4281,6 +4283,7 @@ dependencies = [
42814283
"arena",
42824284
"cfg-if",
42834285
"rustc_data_structures",
4286+
"rustc_index",
42844287
"rustc_macros",
42854288
"scoped-tls",
42864289
"serialize",

src/librustc/arena.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ macro_rules! arena_types {
2626
[] steal_mir: rustc::ty::steal::Steal<rustc::mir::Body<$tcx>>,
2727
[] mir: rustc::mir::Body<$tcx>,
2828
[] steal_promoted: rustc::ty::steal::Steal<
29-
rustc_data_structures::indexed_vec::IndexVec<
29+
rustc_index::vec::IndexVec<
3030
rustc::mir::Promoted,
3131
rustc::mir::Body<$tcx>
3232
>
3333
>,
34-
[] promoted: rustc_data_structures::indexed_vec::IndexVec<
34+
[] promoted: rustc_index::vec::IndexVec<
3535
rustc::mir::Promoted,
3636
rustc::mir::Body<$tcx>
3737
>,

src/librustc/dep_graph/graph.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use errors::Diagnostic;
22
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
33
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
4-
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
4+
use rustc_index::vec::{Idx, IndexVec};
55
use smallvec::SmallVec;
66
use rustc_data_structures::sync::{Lrc, Lock, AtomicU32, Ordering};
77
use std::env;
@@ -26,7 +26,7 @@ pub struct DepGraph {
2626
data: Option<Lrc<DepGraphData>>,
2727
}
2828

29-
newtype_index! {
29+
rustc_index::newtype_index! {
3030
pub struct DepNodeIndex { .. }
3131
}
3232

src/librustc/dep_graph/serialized.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
33
use crate::dep_graph::DepNode;
44
use crate::ich::Fingerprint;
5-
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
5+
use rustc_index::vec::{IndexVec, Idx};
66

7-
newtype_index! {
7+
rustc_index::newtype_index! {
88
pub struct SerializedDepNodeIndex { .. }
99
}
1010

src/librustc/hir/def_id.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use crate::ty::{self, TyCtxt};
2-
use rustc_data_structures::indexed_vec::Idx;
2+
use rustc_index::vec::Idx;
33
use std::fmt;
44
use std::u32;
55

6-
newtype_index! {
6+
rustc_index::newtype_index! {
77
pub struct CrateId {
88
ENCODABLE = custom
99
}
@@ -87,7 +87,7 @@ impl fmt::Display for CrateNum {
8787
impl rustc_serialize::UseSpecializedEncodable for CrateNum {}
8888
impl rustc_serialize::UseSpecializedDecodable for CrateNum {}
8989

90-
newtype_index! {
90+
rustc_index::newtype_index! {
9191
/// A DefIndex is an index into the hir-map for a crate, identifying a
9292
/// particular definition. It should really be considered an interned
9393
/// shorthand for a particular DefPath.

src/librustc/hir/lowering.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use crate::util::common::FN_OUTPUT_NAME;
5252
use crate::util::nodemap::{DefIdMap, NodeMap};
5353
use errors::Applicability;
5454
use rustc_data_structures::fx::FxHashSet;
55-
use rustc_data_structures::indexed_vec::IndexVec;
55+
use rustc_index::vec::IndexVec;
5656
use rustc_data_structures::thin_vec::ThinVec;
5757
use rustc_data_structures::sync::Lrc;
5858

src/librustc/hir/map/collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::hir::map::HirEntryMap;
55
use crate::hir::def_id::{LOCAL_CRATE, CrateNum};
66
use crate::hir::intravisit::{Visitor, NestedVisitorMap};
77
use rustc_data_structures::svh::Svh;
8-
use rustc_data_structures::indexed_vec::IndexVec;
8+
use rustc_index::vec::IndexVec;
99
use crate::ich::Fingerprint;
1010
use crate::middle::cstore::CrateStore;
1111
use crate::session::CrateDisambiguator;

src/librustc/hir/map/definitions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::session::CrateDisambiguator;
1111
use crate::util::nodemap::NodeMap;
1212

1313
use rustc_data_structures::fx::FxHashMap;
14-
use rustc_data_structures::indexed_vec::{IndexVec};
14+
use rustc_index::vec::{IndexVec};
1515
use rustc_data_structures::stable_hasher::StableHasher;
1616
use std::borrow::Borrow;
1717
use std::fmt::Write;

src/librustc/hir/map/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::util::common::time;
1717

1818
use rustc_target::spec::abi::Abi;
1919
use rustc_data_structures::svh::Svh;
20-
use rustc_data_structures::indexed_vec::IndexVec;
20+
use rustc_index::vec::IndexVec;
2121
use syntax::ast::{self, Name, NodeId};
2222
use syntax::source_map::Spanned;
2323
use syntax::ext::base::MacroKind;

src/librustc/hir/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ impl fmt::Display for HirId {
122122

123123
// Hack to ensure that we don't try to access the private parts of `ItemLocalId` in this module.
124124
mod item_local_id_inner {
125-
use rustc_data_structures::indexed_vec::Idx;
125+
use rustc_index::vec::Idx;
126126
use rustc_macros::HashStable;
127-
newtype_index! {
127+
rustc_index::newtype_index! {
128128
/// An `ItemLocalId` uniquely identifies something within a given "item-like";
129129
/// that is, within a `hir::Item`, `hir::TraitItem`, or `hir::ImplItem`. There is no
130130
/// guarantee that the numerical value of a given `ItemLocalId` corresponds to

src/librustc/infer/canonical/canonicalizer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::ty::{self, BoundVar, InferConst, List, Ty, TyCtxt, TypeFlags};
1818
use crate::ty::flags::FlagComputation;
1919

2020
use rustc_data_structures::fx::FxHashMap;
21-
use rustc_data_structures::indexed_vec::Idx;
21+
use rustc_index::vec::Idx;
2222
use smallvec::SmallVec;
2323

2424
impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {

src/librustc/infer/canonical/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use crate::infer::{InferCtxt, RegionVariableOrigin, TypeVariableOrigin, TypeVari
2525
use crate::infer::{ConstVariableOrigin, ConstVariableOriginKind};
2626
use crate::infer::region_constraints::MemberConstraint;
2727
use crate::mir::interpret::ConstValue;
28-
use rustc_data_structures::indexed_vec::IndexVec;
28+
use rustc_index::vec::IndexVec;
2929
use rustc_macros::HashStable;
3030
use rustc_serialize::UseSpecializedDecodable;
3131
use smallvec::SmallVec;

src/librustc/infer/canonical/query_response.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use crate::infer::region_constraints::{Constraint, RegionConstraintData};
1717
use crate::infer::InferCtxtBuilder;
1818
use crate::infer::{InferCtxt, InferOk, InferResult};
1919
use crate::mir::interpret::ConstValue;
20-
use rustc_data_structures::indexed_vec::Idx;
21-
use rustc_data_structures::indexed_vec::IndexVec;
20+
use rustc_index::vec::Idx;
21+
use rustc_index::vec::IndexVec;
2222
use std::fmt::Debug;
2323
use syntax_pos::DUMMY_SP;
2424
use crate::traits::query::{Fallible, NoSolution};

src/librustc/infer/lexical_region_resolve/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use rustc_data_structures::fx::FxHashSet;
1919
use rustc_data_structures::graph::implementation::{
2020
Direction, Graph, NodeIndex, INCOMING, OUTGOING,
2121
};
22-
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
22+
use rustc_index::vec::{Idx, IndexVec};
2323
use smallvec::SmallVec;
2424
use std::fmt;
2525
use syntax_pos::Span;

src/librustc/infer/region_constraints/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use super::unify_key;
77
use super::{MiscVariable, RegionVariableOrigin, SubregionOrigin};
88

99
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
10-
use rustc_data_structures::indexed_vec::IndexVec;
10+
use rustc_index::vec::IndexVec;
1111
use rustc_data_structures::sync::Lrc;
1212
use rustc_data_structures::unify as ut;
1313
use crate::hir::def_id::DefId;

src/librustc/middle/intrinsicck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::ty::layout::{LayoutError, Pointer, SizeSkeleton, VariantIdx};
55
use crate::ty::query::Providers;
66

77
use rustc_target::spec::abi::Abi::RustIntrinsic;
8-
use rustc_data_structures::indexed_vec::Idx;
8+
use rustc_index::vec::Idx;
99
use syntax_pos::{Span, sym};
1010
use crate::hir::intravisit::{self, Visitor, NestedVisitorMap};
1111
use crate::hir;

src/librustc/middle/region.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use crate::util::nodemap::{FxHashMap, FxHashSet};
1616
use crate::ty::{self, DefIdTree, TyCtxt};
1717
use crate::ty::query::Providers;
1818

19-
use rustc_data_structures::indexed_vec::Idx;
2019
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
20+
use rustc_index::vec::Idx;
2121
use rustc_macros::HashStable;
2222
use syntax::source_map;
2323
use syntax_pos::{Span, DUMMY_SP};
@@ -131,7 +131,7 @@ pub enum ScopeData {
131131
Remainder(FirstStatementIndex)
132132
}
133133

134-
newtype_index! {
134+
rustc_index::newtype_index! {
135135
/// Represents a subscope of `block` for a binding that is introduced
136136
/// by `block.stmts[first_statement_index]`. Such subscopes represent
137137
/// a suffix of the block. Note that each subscope does not include

src/librustc/mir/cache.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustc_data_structures::indexed_vec::IndexVec;
1+
use rustc_index::vec::IndexVec;
22
use rustc_data_structures::sync::{RwLock, MappedReadGuard, ReadGuard};
33
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
44
use rustc_serialize::{Encodable, Encoder, Decodable, Decoder};

src/librustc/mir/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use rustc_index::bit_set::BitMatrix;
2424
use rustc_data_structures::fx::FxHashSet;
2525
use rustc_data_structures::graph::dominators::{dominators, Dominators};
2626
use rustc_data_structures::graph::{self, GraphPredecessors, GraphSuccessors};
27-
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
27+
use rustc_index::vec::{Idx, IndexVec};
2828
use rustc_data_structures::sync::Lrc;
2929
use rustc_data_structures::sync::MappedReadGuard;
3030
use rustc_macros::HashStable;
@@ -581,7 +581,7 @@ impl BorrowKind {
581581
///////////////////////////////////////////////////////////////////////////
582582
// Variables and temps
583583

584-
newtype_index! {
584+
rustc_index::newtype_index! {
585585
pub struct Local {
586586
derive [HashStable]
587587
DEBUG_FORMAT = "_{}",
@@ -994,7 +994,7 @@ pub struct UpvarDebuginfo {
994994
///////////////////////////////////////////////////////////////////////////
995995
// BasicBlock
996996

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

1835-
newtype_index! {
1835+
rustc_index::newtype_index! {
18361836
pub struct Field {
18371837
derive [HashStable]
18381838
DEBUG_FORMAT = "field[{}]"
@@ -2047,7 +2047,7 @@ impl Debug for PlaceBase<'_> {
20472047
///////////////////////////////////////////////////////////////////////////
20482048
// Scopes
20492049

2050-
newtype_index! {
2050+
rustc_index::newtype_index! {
20512051
pub struct SourceScope {
20522052
derive [HashStable]
20532053
DEBUG_FORMAT = "scope[{}]",
@@ -2586,7 +2586,7 @@ impl<'tcx> TypeFoldable<'tcx> for UserTypeProjection {
25862586
}
25872587
}
25882588

2589-
newtype_index! {
2589+
rustc_index::newtype_index! {
25902590
pub struct Promoted {
25912591
derive [HashStable]
25922592
DEBUG_FORMAT = "promoted[{}]"
@@ -2743,7 +2743,7 @@ pub struct UnsafetyCheckResult {
27432743
pub unsafe_blocks: Lrc<[(hir::HirId, bool)]>,
27442744
}
27452745

2746-
newtype_index! {
2746+
rustc_index::newtype_index! {
27472747
pub struct GeneratorSavedLocal {
27482748
derive [HashStable]
27492749
DEBUG_FORMAT = "_{}",

src/librustc/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ rustc_queries! {
132132
cache_on_disk_if { key.is_local() }
133133
load_cached(tcx, id) {
134134
let promoted: Option<
135-
rustc_data_structures::indexed_vec::IndexVec<
135+
rustc_index::vec::IndexVec<
136136
crate::mir::Promoted,
137137
crate::mir::Body<'tcx>
138138
>> = tcx.queries.on_disk_cache.try_load_query_result(tcx, id);

src/librustc/ty/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use smallvec::SmallVec;
5252
use rustc_data_structures::stable_hasher::{
5353
HashStable, StableHasher, StableVec, hash_stable_hashmap,
5454
};
55-
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
55+
use rustc_index::vec::{Idx, IndexVec};
5656
use rustc_data_structures::sharded::ShardedHashMap;
5757
use rustc_data_structures::sync::{Lrc, Lock, WorkerLocal};
5858
use std::any::Any;
@@ -777,7 +777,7 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TypeckTables<'tcx> {
777777
}
778778
}
779779

780-
newtype_index! {
780+
rustc_index::newtype_index! {
781781
pub struct UserTypeAnnotationIndex {
782782
derive [HashStable]
783783
DEBUG_FORMAT = "UserType({})",

src/librustc/ty/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use crate::mir::{GeneratorLayout, GeneratorSavedLocal};
1818
use crate::ty::GeneratorSubsts;
1919
use crate::ty::subst::Subst;
2020
use rustc_index::bit_set::BitSet;
21-
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
2221
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
22+
use rustc_index::vec::{IndexVec, Idx};
2323

2424
pub use rustc_target::abi::*;
2525
use rustc_target::spec::{HasTargetSpec, abi::Abi as SpecAbi};

src/librustc/ty/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ use syntax_pos::Span;
5151

5252
use smallvec;
5353
use rustc_data_structures::fx::FxIndexMap;
54-
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
5554
use rustc_data_structures::stable_hasher::{StableHasher, HashStable};
55+
use rustc_index::vec::{Idx, IndexVec};
5656

5757
use crate::hir;
5858

@@ -1536,7 +1536,7 @@ impl<'tcx> InstantiatedPredicates<'tcx> {
15361536
}
15371537
}
15381538

1539-
newtype_index! {
1539+
rustc_index::newtype_index! {
15401540
/// "Universes" are used during type- and trait-checking in the
15411541
/// presence of `for<..>` binders to control what sets of names are
15421542
/// visible. Universes are arranged into a tree: the root universe

src/librustc/ty/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use crate::util::profiling::ProfileCategory::*;
4343

4444
use rustc_data_structures::svh::Svh;
4545
use rustc_index::bit_set::BitSet;
46-
use rustc_data_structures::indexed_vec::IndexVec;
46+
use rustc_index::vec::IndexVec;
4747
use rustc_data_structures::fx::{FxIndexMap, FxHashMap, FxHashSet};
4848
use rustc_data_structures::stable_hasher::StableVec;
4949
use rustc_data_structures::sync::Lrc;

src/librustc/ty/query/on_disk_cache.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use errors::Diagnostic;
1515
use rustc_data_structures::fx::FxHashMap;
1616
use rustc_data_structures::thin_vec::ThinVec;
1717
use rustc_data_structures::sync::{Lrc, Lock, HashMapExt, Once};
18-
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
18+
use rustc_index::vec::{IndexVec, Idx};
1919
use rustc_serialize::{
2020
Decodable, Decoder, Encodable, Encoder, SpecializedDecoder, SpecializedEncoder,
2121
UseSpecializedDecodable, UseSpecializedEncodable, opaque,

src/librustc/ty/structural_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::mir::interpret::ConstValue;
99
use crate::ty::{self, Lift, Ty, TyCtxt, InferConst};
1010
use crate::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
1111
use crate::ty::print::{FmtPrinter, Printer};
12-
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
12+
use rustc_index::vec::{IndexVec, Idx};
1313
use smallvec::SmallVec;
1414
use crate::mir::interpret;
1515

0 commit comments

Comments
 (0)