diff --git a/src/librustc/hir/map/collector.rs b/src/librustc/hir/map/collector.rs index 00026d6969bb..ffb5610c2c3e 100644 --- a/src/librustc/hir/map/collector.rs +++ b/src/librustc/hir/map/collector.rs @@ -8,7 +8,7 @@ use crate::ich::Fingerprint; use crate::middle::cstore::CrateStore; use crate::session::CrateDisambiguator; use crate::session::Session; -use crate::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::svh::Svh; use rustc_index::vec::IndexVec; use rustc_span::source_map::SourceMap; diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs index 9ea10d0c5159..15914809ba4c 100644 --- a/src/librustc/hir/map/mod.rs +++ b/src/librustc/hir/map/mod.rs @@ -12,8 +12,8 @@ use crate::hir::*; use crate::middle::cstore::CrateStoreDyn; use crate::ty::query::Providers; use crate::util::common::time; -use crate::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::svh::Svh; use rustc_index::vec::IndexVec; use rustc_span::hygiene::MacroKind; diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index 959a4a0a304f..39c9866666c4 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -11,9 +11,10 @@ pub use self::UnsafeSource::*; use crate::hir::def::{DefKind, Res}; use crate::hir::def_id::{DefId, DefIndex, LocalDefId, CRATE_DEF_INDEX}; use crate::ty::query::Providers; -use crate::util::nodemap::{FxHashSet, NodeMap}; +use crate::util::nodemap::NodeMap; use errors::FatalError; +use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::sync::{par_for_each_in, Send, Sync}; use rustc_macros::HashStable; use rustc_serialize::{self, Decodable, Decoder, Encodable, Encoder}; diff --git a/src/librustc/infer/freshen.rs b/src/librustc/infer/freshen.rs index f258968b2a31..16087959972b 100644 --- a/src/librustc/infer/freshen.rs +++ b/src/librustc/infer/freshen.rs @@ -33,7 +33,8 @@ use crate::ty::fold::TypeFolder; use crate::ty::{self, Ty, TyCtxt, TypeFoldable}; -use crate::util::nodemap::FxHashMap; + +use rustc_data_structures::fx::FxHashMap; use std::collections::hash_map::Entry; diff --git a/src/librustc/infer/lexical_region_resolve/graphviz.rs b/src/librustc/infer/lexical_region_resolve/graphviz.rs index 2a3187afd710..b7a3ff6987cb 100644 --- a/src/librustc/infer/lexical_region_resolve/graphviz.rs +++ b/src/librustc/infer/lexical_region_resolve/graphviz.rs @@ -15,7 +15,7 @@ use crate::infer::SubregionOrigin; use crate::middle::free_region::RegionRelations; use crate::middle::region; use crate::ty; -use crate::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use std::borrow::Cow; use std::collections::btree_map::BTreeMap; diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs index f9bc9020f163..5c11659b550c 100644 --- a/src/librustc/infer/mod.rs +++ b/src/librustc/infer/mod.rs @@ -22,9 +22,9 @@ use crate::ty::relate::RelateResult; use crate::ty::subst::{GenericArg, InternalSubsts, SubstsRef}; use crate::ty::{self, GenericParamDefKind, InferConst, Ty, TyCtxt}; use crate::ty::{ConstVid, FloatVid, IntVid, TyVid}; -use crate::util::nodemap::{FxHashMap, FxHashSet}; use errors::DiagnosticBuilder; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::sync::Lrc; use rustc_data_structures::unify as ut; use rustc_span::symbol::Symbol; diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index e1350ad03a10..ca6a7beb48ed 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -27,9 +27,8 @@ use crate::middle::privacy::AccessLevels; use crate::session::Session; use crate::ty::layout::{LayoutError, LayoutOf, TyLayout}; use crate::ty::{self, print::Printer, subst::GenericArg, Ty, TyCtxt}; -use crate::util::nodemap::FxHashMap; - use errors::DiagnosticBuilder; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::sync; use rustc_span::{symbol::Symbol, MultiSpan, Span}; use std::slice; diff --git a/src/librustc/lint/levels.rs b/src/librustc/lint/levels.rs index b1894a1f9ba2..40e6f22c25f3 100644 --- a/src/librustc/lint/levels.rs +++ b/src/librustc/lint/levels.rs @@ -6,8 +6,8 @@ use crate::lint::builtin; use crate::lint::context::{CheckLintNameResult, LintStore}; use crate::lint::{self, Level, Lint, LintId, LintSource}; use crate::session::Session; -use crate::util::nodemap::FxHashMap; use errors::{Applicability, DiagnosticBuilder}; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_span::source_map::MultiSpan; use rustc_span::symbol::{sym, Symbol}; diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs index 98e48ca0e4d9..0e9a2a39fd91 100644 --- a/src/librustc/middle/lang_items.rs +++ b/src/librustc/middle/lang_items.rs @@ -9,15 +9,15 @@ pub use self::LangItem::*; +use crate::hir; use crate::hir::check_attr::Target; use crate::hir::def_id::DefId; +use crate::hir::itemlikevisit::ItemLikeVisitor; use crate::middle::cstore::ExternCrate; use crate::middle::weak_lang_items; use crate::ty::{self, TyCtxt}; -use crate::util::nodemap::FxHashMap; -use crate::hir; -use crate::hir::itemlikevisit::ItemLikeVisitor; +use rustc_data_structures::fx::FxHashMap; use rustc_macros::HashStable; use rustc_span::symbol::{sym, Symbol}; use rustc_span::Span; diff --git a/src/librustc/middle/privacy.rs b/src/librustc/middle/privacy.rs index fc48999115e8..770a974da07f 100644 --- a/src/librustc/middle/privacy.rs +++ b/src/librustc/middle/privacy.rs @@ -3,8 +3,9 @@ //! which are available for use externally when compiled as a library. use crate::hir::HirId; -use crate::util::nodemap::{DefIdSet, FxHashMap}; +use crate::util::nodemap::DefIdSet; +use rustc_data_structures::fx::FxHashMap; use rustc_macros::HashStable; use std::fmt; use std::hash::Hash; diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index dd03a703c896..ee96b595f6fd 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -11,8 +11,8 @@ use crate::hir::def_id::DefId; use crate::hir::Node; use crate::ich::{NodeIdHashingMode, StableHashingContext}; use crate::ty::{self, DefIdTree, TyCtxt}; -use crate::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_index::vec::Idx; use rustc_macros::HashStable; diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs index 6926ed24afdf..951181c8900c 100644 --- a/src/librustc/middle/resolve_lifetime.rs +++ b/src/librustc/middle/resolve_lifetime.rs @@ -5,7 +5,7 @@ use crate::hir::{GenericParam, ItemLocalId}; use crate::hir::{GenericParamKind, LifetimeParamKind}; use crate::ty; -use crate::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_macros::HashStable; /// The origin of a named lifetime definition. diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs index a6a49864a956..0c756c71fbdf 100644 --- a/src/librustc/middle/stability.rs +++ b/src/librustc/middle/stability.rs @@ -10,8 +10,9 @@ use crate::lint::builtin::BuiltinLintDiagnostics; use crate::lint::{self, in_derive_expansion, Lint}; use crate::session::{DiagnosticMessageId, Session}; use crate::ty::{self, TyCtxt}; -use crate::util::nodemap::{FxHashMap, FxHashSet}; + use errors::DiagnosticBuilder; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_feature::GateIssue; use rustc_span::symbol::{sym, Symbol}; use rustc_span::{MultiSpan, Span}; diff --git a/src/librustc/mir/mono.rs b/src/librustc/mir/mono.rs index bec98221e5af..2dbe1d4fa5c4 100644 --- a/src/librustc/mir/mono.rs +++ b/src/librustc/mir/mono.rs @@ -5,8 +5,8 @@ use crate::ich::{Fingerprint, NodeIdHashingMode, StableHashingContext}; use crate::session::config::OptLevel; use crate::ty::print::obsolete::DefPathBasedNames; use crate::ty::{subst::InternalSubsts, Instance, InstanceDef, SymbolName, TyCtxt}; -use crate::util::nodemap::FxHashMap; use rustc_data_structures::base_n; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_span::source_map::Span; use rustc_span::symbol::Symbol; diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index dbc872a51bfb..3fef1dd064ed 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -21,10 +21,10 @@ use crate::ty::GenericParamDefKind; use crate::ty::SubtypePredicate; use crate::ty::TypeckTables; use crate::ty::{self, AdtKind, DefIdTree, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, TypeFoldable}; -use crate::util::nodemap::{FxHashMap, FxHashSet}; use errors::{pluralize, Applicability, DiagnosticBuilder, Style}; use rustc::hir::def_id::LOCAL_CRATE; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span::source_map::SourceMap; use rustc_span::symbol::{kw, sym}; use rustc_span::{ExpnKind, MultiSpan, Span, DUMMY_SP}; diff --git a/src/librustc/traits/on_unimplemented.rs b/src/librustc/traits/on_unimplemented.rs index 9097cbf0c221..f1a04da188ba 100644 --- a/src/librustc/traits/on_unimplemented.rs +++ b/src/librustc/traits/on_unimplemented.rs @@ -3,8 +3,8 @@ use fmt_macros::{Parser, Piece, Position}; use crate::hir::def_id::DefId; use crate::ty::{self, GenericParamDefKind, TyCtxt}; use crate::util::common::ErrorReported; -use crate::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::Span; use syntax::ast::{MetaItem, NestedMetaItem}; diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index 7e412eb03038..0d35ad2a4cdd 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -39,7 +39,7 @@ use crate::ty::subst::{Subst, SubstsRef}; use crate::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, TypeFoldable}; use crate::hir; -use crate::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::sync::Lock; use rustc_index::bit_set::GrowableBitSet; use rustc_span::symbol::sym; diff --git a/src/librustc/traits/specialize/specialization_graph.rs b/src/librustc/traits/specialize/specialization_graph.rs index 8d2dcee22f54..fe6759823082 100644 --- a/src/librustc/traits/specialize/specialization_graph.rs +++ b/src/librustc/traits/specialize/specialization_graph.rs @@ -5,7 +5,8 @@ use crate::ich::{self, StableHashingContext}; use crate::traits; use crate::ty::fast_reject::{self, SimplifiedType}; use crate::ty::{self, TyCtxt, TypeFoldable}; -use crate::util::nodemap::{DefIdMap, FxHashMap}; +use crate::util::nodemap::DefIdMap; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use syntax::ast::Ident; diff --git a/src/librustc/traits/util.rs b/src/librustc/traits/util.rs index 99f6e933fb41..995131178284 100644 --- a/src/librustc/traits/util.rs +++ b/src/librustc/traits/util.rs @@ -7,7 +7,7 @@ use crate::hir::def_id::DefId; use crate::ty::outlives::Component; use crate::ty::subst::{GenericArg, Subst, SubstsRef}; use crate::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt}; -use crate::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use super::{Normalized, Obligation, ObligationCause, PredicateObligation, SelectionContext}; diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index c26d68de181b..25db4f0f4ab1 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -47,10 +47,10 @@ use crate::ty::{InferConst, ParamConst}; use crate::ty::{List, TyKind, TyS}; use crate::util::common::ErrorReported; use crate::util::nodemap::{DefIdMap, DefIdSet, ItemLocalMap, ItemLocalSet, NodeMap}; -use crate::util::nodemap::{FxHashMap, FxHashSet}; use arena::SyncDroplessArena; use errors::DiagnosticBuilder; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::profiling::SelfProfilerRef; use rustc_data_structures::sharded::ShardedHashMap; use rustc_data_structures::stable_hasher::{ diff --git a/src/librustc/ty/fold.rs b/src/librustc/ty/fold.rs index 53a1727d1cc1..7004cec8a31c 100644 --- a/src/librustc/ty/fold.rs +++ b/src/librustc/ty/fold.rs @@ -34,7 +34,7 @@ use crate::hir::def_id::DefId; use crate::ty::{self, flags::FlagComputation, Binder, Ty, TyCtxt, TypeFlags}; -use crate::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use std::collections::BTreeMap; use std::fmt; diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 2707d07633b2..452ae073f1da 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -28,8 +28,9 @@ use crate::ty::subst::{InternalSubsts, Subst, SubstsRef}; use crate::ty::util::{Discr, IntTypeExt}; use crate::ty::walk::TypeWalker; use crate::util::captures::Captures; -use crate::util::nodemap::{DefIdMap, FxHashMap, NodeMap, NodeSet}; +use crate::util::nodemap::{DefIdMap, NodeMap, NodeSet}; use arena::SyncDroplessArena; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::svh::Svh; use rustc_macros::HashStable; diff --git a/src/librustc/util/nodemap.rs b/src/librustc/util/nodemap.rs index ce0f77e0b6d3..c166a712d7b7 100644 --- a/src/librustc/util/nodemap.rs +++ b/src/librustc/util/nodemap.rs @@ -4,13 +4,10 @@ use crate::hir::def_id::DefId; use crate::hir::{HirId, ItemLocalId}; use syntax::ast; -pub use rustc_data_structures::fx::FxHashMap; -pub use rustc_data_structures::fx::FxHashSet; - macro_rules! define_id_collections { ($map_name:ident, $set_name:ident, $key:ty) => { - pub type $map_name = FxHashMap<$key, T>; - pub type $set_name = FxHashSet<$key>; + pub type $map_name = rustc_data_structures::fx::FxHashMap<$key, T>; + pub type $set_name = rustc_data_structures::fx::FxHashSet<$key>; }; } diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs index c0a5e0089a95..746b76ad1c7d 100644 --- a/src/librustc_codegen_llvm/context.rs +++ b/src/librustc_codegen_llvm/context.rs @@ -19,10 +19,10 @@ use rustc::ty::layout::{ FnAbiExt, HasParamEnv, LayoutError, LayoutOf, PointeeInfo, Size, TyLayout, VariantIdx, }; use rustc::ty::{self, Instance, Ty, TyCtxt}; -use rustc::util::nodemap::FxHashMap; use rustc_codegen_ssa::base::wants_msvc_seh; use rustc_data_structures::base_n; use rustc_data_structures::const_cstr; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::small_c_str::SmallCStr; use rustc_target::spec::{HasTargetSpec, Target}; diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index a03938082da5..88e692cb1174 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -33,11 +33,11 @@ use rustc::ty::layout::{ use rustc::ty::subst::{GenericArgKind, SubstsRef}; use rustc::ty::Instance; use rustc::ty::{self, AdtKind, ParamEnv, Ty, TyCtxt}; -use rustc::util::nodemap::FxHashMap; use rustc::{bug, span_bug}; use rustc_codegen_ssa::traits::*; use rustc_data_structures::const_cstr; use rustc_data_structures::fingerprint::Fingerprint; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::small_c_str::SmallCStr; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_fs_util::path_to_c_string; diff --git a/src/librustc_codegen_llvm/debuginfo/mod.rs b/src/librustc_codegen_llvm/debuginfo/mod.rs index 143fa651a151..3fea27445a09 100644 --- a/src/librustc_codegen_llvm/debuginfo/mod.rs +++ b/src/librustc_codegen_llvm/debuginfo/mod.rs @@ -24,9 +24,10 @@ use crate::value::Value; use rustc::mir; use rustc::session::config::{self, DebugInfo}; use rustc::ty::{self, Instance, InstanceDef, ParamEnv, Ty}; -use rustc::util::nodemap::{DefIdMap, FxHashMap, FxHashSet}; +use rustc::util::nodemap::DefIdMap; use rustc_codegen_ssa::debuginfo::type_names; use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::small_c_str::SmallCStr; use rustc_index::vec::IndexVec; diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs index fba221a80f70..44e9067a60a6 100644 --- a/src/librustc_codegen_ssa/back/symbol_export.rs +++ b/src/librustc_codegen_ssa/back/symbol_export.rs @@ -11,8 +11,9 @@ use rustc::ty::query::Providers; use rustc::ty::subst::SubstsRef; use rustc::ty::Instance; use rustc::ty::{SymbolName, TyCtxt}; -use rustc::util::nodemap::{DefIdMap, FxHashMap}; +use rustc::util::nodemap::DefIdMap; use rustc_data_structures::fingerprint::Fingerprint; +use rustc_data_structures::fx::FxHashMap; use rustc_index::vec::IndexVec; use syntax::expand::allocator::ALLOCATOR_METHODS; diff --git a/src/librustc_codegen_ssa/back/write.rs b/src/librustc_codegen_ssa/back/write.rs index 4e49d4dda935..f901a51ada80 100644 --- a/src/librustc_codegen_ssa/back/write.rs +++ b/src/librustc_codegen_ssa/back/write.rs @@ -19,7 +19,7 @@ use rustc::session::config::{ use rustc::session::Session; use rustc::ty::TyCtxt; use rustc::util::common::{print_time_passes_entry, set_time_depth, time_depth}; -use rustc::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::profiling::SelfProfilerRef; use rustc_data_structures::svh::Svh; use rustc_data_structures::sync::Lrc; diff --git a/src/librustc_codegen_ssa/base.rs b/src/librustc_codegen_ssa/base.rs index d340e0f25231..b964fa1c182c 100644 --- a/src/librustc_codegen_ssa/base.rs +++ b/src/librustc_codegen_ssa/base.rs @@ -40,8 +40,8 @@ use rustc::ty::layout::{FAT_PTR_ADDR, FAT_PTR_EXTRA}; use rustc::ty::query::Providers; use rustc::ty::{self, Instance, Ty, TyCtxt}; use rustc::util::common::{print_time_passes_entry, set_time_depth, time, time_depth}; -use rustc::util::nodemap::FxHashMap; use rustc_codegen_utils::{check_for_rustc_errors_attr, symbol_names_test}; +use rustc_data_structures::fx::FxHashMap; use rustc_index::vec::Idx; use rustc_session::cgu_reuse_tracker::CguReuse; use rustc_span::Span; diff --git a/src/librustc_codegen_ssa/traits/misc.rs b/src/librustc_codegen_ssa/traits/misc.rs index 658ddd002807..691b94c2f9d4 100644 --- a/src/librustc_codegen_ssa/traits/misc.rs +++ b/src/librustc_codegen_ssa/traits/misc.rs @@ -2,7 +2,7 @@ use super::BackendTypes; use rustc::mir::mono::CodegenUnit; use rustc::session::Session; use rustc::ty::{self, Instance, Ty}; -use rustc::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use std::cell::RefCell; use std::sync::Arc; diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 055b1f8b366d..90d87e34e48d 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -33,7 +33,7 @@ use rustc::ty::{self, layout::VariantIdx, Ty, TyCtxt}; use rustc::{lint, util}; use util::nodemap::HirIdSet; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_feature::Stability; use rustc_feature::{deprecated_attributes, AttributeGate, AttributeTemplate, AttributeType}; diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs index 67eccda5eb7e..7944c88c7cbd 100644 --- a/src/librustc_lint/types.rs +++ b/src/librustc_lint/types.rs @@ -5,11 +5,12 @@ use lint::{LateContext, LintArray, LintContext}; use lint::{LateLintPass, LintPass}; use rustc::hir; use rustc::hir::{is_range_literal, ExprKind, Node}; +use rustc::lint; use rustc::mir::interpret::{sign_extend, truncate}; use rustc::ty::layout::{self, IntegerExt, LayoutOf, SizeSkeleton, VariantIdx}; use rustc::ty::subst::SubstsRef; use rustc::ty::{self, AdtKind, ParamEnv, Ty, TyCtxt}; -use rustc::{lint, util::nodemap::FxHashSet}; +use rustc_data_structures::fx::FxHashSet; use rustc_index::vec::Idx; use rustc_span::source_map; use rustc_span::symbol::sym; diff --git a/src/librustc_metadata/dependency_format.rs b/src/librustc_metadata/dependency_format.rs index 191231a3d608..f82579aba02a 100644 --- a/src/librustc_metadata/dependency_format.rs +++ b/src/librustc_metadata/dependency_format.rs @@ -59,7 +59,7 @@ use rustc::middle::cstore::{self, DepKind}; use rustc::middle::dependency_format::{Dependencies, DependencyList, Linkage}; use rustc::session::config; use rustc::ty::TyCtxt; -use rustc::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_target::spec::PanicStrategy; crate fn calculate(tcx: TyCtxt<'_>) -> Dependencies { diff --git a/src/librustc_metadata/locator.rs b/src/librustc_metadata/locator.rs index a9adb6291c74..59e769cabb7d 100644 --- a/src/librustc_metadata/locator.rs +++ b/src/librustc_metadata/locator.rs @@ -219,8 +219,7 @@ use rustc::middle::cstore::{CrateSource, MetadataLoader}; use rustc::session::filesearch::{FileDoesntMatch, FileMatches, FileSearch}; use rustc::session::search_paths::PathKind; use rustc::session::{config, CrateDisambiguator, Session}; -use rustc::util::nodemap::FxHashMap; -use rustc_data_structures::fx::FxHashSet; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::svh::Svh; use rustc_data_structures::sync::MetadataRef; diff --git a/src/librustc_metadata/native_libs.rs b/src/librustc_metadata/native_libs.rs index 3228c9f2ff43..bdd9eab71186 100644 --- a/src/librustc_metadata/native_libs.rs +++ b/src/librustc_metadata/native_libs.rs @@ -3,7 +3,7 @@ use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::middle::cstore::{self, NativeLibrary}; use rustc::session::Session; use rustc::ty::TyCtxt; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_span::source_map::Span; use rustc_span::symbol::{kw, sym, Symbol}; use rustc_target::spec::abi::Abi; diff --git a/src/librustc_metadata/rmeta/encoder.rs b/src/librustc_metadata/rmeta/encoder.rs index 6d84bd6f2636..fc7eae1e6c7a 100644 --- a/src/librustc_metadata/rmeta/encoder.rs +++ b/src/librustc_metadata/rmeta/encoder.rs @@ -18,8 +18,7 @@ use rustc_data_structures::fingerprint::Fingerprint; use rustc_index::vec::Idx; use rustc::session::config::{self, CrateType}; -use rustc::util::nodemap::FxHashMap; - +use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stable_hasher::StableHasher; use rustc_data_structures::sync::Lrc; use rustc_serialize::{opaque, Encodable, Encoder, SpecializedEncoder}; diff --git a/src/librustc_mir/borrow_check/borrow_set.rs b/src/librustc_mir/borrow_check/borrow_set.rs index 1423ff2ed417..b66b2e4b1f7f 100644 --- a/src/librustc_mir/borrow_check/borrow_set.rs +++ b/src/librustc_mir/borrow_check/borrow_set.rs @@ -7,7 +7,7 @@ use rustc::mir::traversal; use rustc::mir::visit::{MutatingUseContext, NonUseContext, PlaceContext, Visitor}; use rustc::mir::{self, Body, Local, Location, ReadOnlyBodyAndCache}; use rustc::ty::{RegionVid, TyCtxt}; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_index::bit_set::BitSet; use rustc_index::vec::IndexVec; use std::fmt; diff --git a/src/librustc_mir/borrow_check/universal_regions.rs b/src/librustc_mir/borrow_check/universal_regions.rs index 4e3aa4c65b6a..c7ef017215e0 100644 --- a/src/librustc_mir/borrow_check/universal_regions.rs +++ b/src/librustc_mir/borrow_check/universal_regions.rs @@ -20,7 +20,7 @@ use rustc::middle::lang_items; use rustc::ty::fold::TypeFoldable; use rustc::ty::subst::{InternalSubsts, Subst, SubstsRef}; use rustc::ty::{self, RegionVid, Ty, TyCtxt}; -use rustc::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_errors::DiagnosticBuilder; use rustc_index::vec::{Idx, IndexVec}; use std::iter; diff --git a/src/librustc_mir/dataflow/move_paths/mod.rs b/src/librustc_mir/dataflow/move_paths/mod.rs index 6b711c37dae3..6450762d351b 100644 --- a/src/librustc_mir/dataflow/move_paths/mod.rs +++ b/src/librustc_mir/dataflow/move_paths/mod.rs @@ -1,7 +1,7 @@ use core::slice::Iter; use rustc::mir::*; use rustc::ty::{ParamEnv, Ty, TyCtxt}; -use rustc::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_index::vec::{Enumerated, Idx, IndexVec}; use rustc_span::Span; use smallvec::SmallVec; diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index 16319d1ab370..d0775d10a2c7 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/src/librustc_mir/monomorphize/collector.rs @@ -192,8 +192,8 @@ use rustc::ty::print::obsolete::DefPathBasedNames; use rustc::ty::subst::{InternalSubsts, Subst, SubstsRef}; use rustc::ty::{self, GenericParamDefKind, Instance, Ty, TyCtxt, TypeFoldable}; use rustc::util::common::time; -use rustc::util::nodemap::{DefIdMap, FxHashMap, FxHashSet}; - +use rustc::util::nodemap::DefIdMap; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::sync::{par_iter, MTLock, MTRef, ParallelIterator}; use rustc_index::bit_set::GrowableBitSet; diff --git a/src/librustc_mir/monomorphize/partitioning.rs b/src/librustc_mir/monomorphize/partitioning.rs index afbae7676fdc..d6d174bef89f 100644 --- a/src/librustc_mir/monomorphize/partitioning.rs +++ b/src/librustc_mir/monomorphize/partitioning.rs @@ -106,7 +106,8 @@ use rustc::ty::print::characteristic_def_id_of_type; use rustc::ty::query::Providers; use rustc::ty::{self, DefIdTree, InstanceDef, TyCtxt}; use rustc::util::common::time; -use rustc::util::nodemap::{DefIdSet, FxHashMap, FxHashSet}; +use rustc::util::nodemap::DefIdSet; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span::symbol::Symbol; use crate::monomorphize::collector::InliningMap; diff --git a/src/librustc_mir/transform/elaborate_drops.rs b/src/librustc_mir/transform/elaborate_drops.rs index 269465fb88b4..860a014c5173 100644 --- a/src/librustc_mir/transform/elaborate_drops.rs +++ b/src/librustc_mir/transform/elaborate_drops.rs @@ -13,7 +13,7 @@ use rustc::hir; use rustc::mir::*; use rustc::ty::layout::VariantIdx; use rustc::ty::{self, TyCtxt}; -use rustc::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_index::bit_set::BitSet; use rustc_span::Span; use std::fmt; diff --git a/src/librustc_mir/transform/instcombine.rs b/src/librustc_mir/transform/instcombine.rs index 02022b7bbf1d..a2f3fcea7569 100644 --- a/src/librustc_mir/transform/instcombine.rs +++ b/src/librustc_mir/transform/instcombine.rs @@ -7,7 +7,7 @@ use rustc::mir::{ ProjectionElem, Rvalue, }; use rustc::ty::{self, TyCtxt}; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_index::vec::Idx; use std::mem; diff --git a/src/librustc_passes/dead.rs b/src/librustc_passes/dead.rs index 8e813ec692e7..f9db1a21cc87 100644 --- a/src/librustc_passes/dead.rs +++ b/src/librustc_passes/dead.rs @@ -13,9 +13,7 @@ use rustc::lint; use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags; use rustc::middle::privacy; use rustc::ty::{self, DefIdTree, TyCtxt}; -use rustc::util::nodemap::FxHashSet; - -use rustc_data_structures::fx::FxHashMap; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span; use rustc_span::symbol::sym; diff --git a/src/librustc_passes/diagnostic_items.rs b/src/librustc_passes/diagnostic_items.rs index 4e8b5c5f6b65..6b2c42602ff0 100644 --- a/src/librustc_passes/diagnostic_items.rs +++ b/src/librustc_passes/diagnostic_items.rs @@ -9,13 +9,12 @@ //! //! * Compiler internal types like `Ty` and `TyCtxt` +use rustc::hir; use rustc::hir::def_id::{DefId, LOCAL_CRATE}; +use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::ty::query::Providers; use rustc::ty::TyCtxt; -use rustc::util::nodemap::FxHashMap; - -use rustc::hir; -use rustc::hir::itemlikevisit::ItemLikeVisitor; +use rustc_data_structures::fx::FxHashMap; use rustc_span::symbol::{sym, Symbol}; use syntax::ast; diff --git a/src/librustc_passes/hir_stats.rs b/src/librustc_passes/hir_stats.rs index d52f31ceeead..4341ebfc4573 100644 --- a/src/librustc_passes/hir_stats.rs +++ b/src/librustc_passes/hir_stats.rs @@ -5,7 +5,7 @@ use rustc::hir::intravisit as hir_visit; use rustc::hir::{self, HirId}; use rustc::util::common::to_readable_str; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span::Span; use syntax::ast::{self, AttrId, NodeId}; use syntax::visit as ast_visit; diff --git a/src/librustc_passes/reachable.rs b/src/librustc_passes/reachable.rs index c3ab595ad682..1c8733ab44db 100644 --- a/src/librustc_passes/reachable.rs +++ b/src/librustc_passes/reachable.rs @@ -18,7 +18,8 @@ use rustc::middle::privacy; use rustc::session::config; use rustc::ty::query::Providers; use rustc::ty::{self, TyCtxt}; -use rustc::util::nodemap::{FxHashSet, HirIdSet}; +use rustc::util::nodemap::HirIdSet; +use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::sync::Lrc; use rustc_target::spec::abi::Abi; diff --git a/src/librustc_passes/region.rs b/src/librustc_passes/region.rs index 685e48e0f355..7652d5a36ee1 100644 --- a/src/librustc_passes/region.rs +++ b/src/librustc_passes/region.rs @@ -14,8 +14,7 @@ use rustc::hir::{Arm, Block, Expr, Local, Pat, PatKind, Stmt}; use rustc::middle::region::*; use rustc::ty::query::Providers; use rustc::ty::TyCtxt; -use rustc::util::nodemap::FxHashSet; - +use rustc_data_structures::fx::FxHashSet; use rustc_index::vec::Idx; use rustc_span::source_map; use rustc_span::Span; diff --git a/src/librustc_passes/stability.rs b/src/librustc_passes/stability.rs index 686ed6c1345b..60f26625a2e8 100644 --- a/src/librustc_passes/stability.rs +++ b/src/librustc_passes/stability.rs @@ -11,7 +11,7 @@ use rustc::middle::stability::{DeprecationEntry, Index}; use rustc::session::Session; use rustc::ty::query::Providers; use rustc::ty::TyCtxt; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span::symbol::{sym, Symbol}; use rustc_span::Span; use syntax::ast::Attribute; diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index c4538ddc2422..1d45f1cd9124 100644 --- a/src/librustc_resolve/diagnostics.rs +++ b/src/librustc_resolve/diagnostics.rs @@ -8,7 +8,7 @@ use rustc::hir::def::{self, DefKind, NonMacroAttrKind}; use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX}; use rustc::session::Session; use rustc::ty::{self, DefIdTree}; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_feature::BUILTIN_ATTRIBUTES; use rustc_span::hygiene::MacroKind; use rustc_span::source_map::SourceMap; diff --git a/src/librustc_resolve/imports.rs b/src/librustc_resolve/imports.rs index eb2c4f79feff..9b7cd2578f87 100644 --- a/src/librustc_resolve/imports.rs +++ b/src/librustc_resolve/imports.rs @@ -19,10 +19,9 @@ use rustc::lint::builtin::BuiltinLintDiagnostics; use rustc::lint::builtin::{PUB_USE_OF_PRIVATE_EXTERN_CRATE, UNUSED_IMPORTS}; use rustc::session::DiagnosticMessageId; use rustc::ty; -use rustc::util::nodemap::FxHashSet; use rustc::{bug, span_bug}; +use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::ptr_key::PtrKey; - use rustc_span::hygiene::ExpnId; use rustc_span::symbol::kw; use rustc_span::{MultiSpan, Span}; diff --git a/src/librustc_resolve/late.rs b/src/librustc_resolve/late.rs index cc9e617f430c..84cb3f718199 100644 --- a/src/librustc_resolve/late.rs +++ b/src/librustc_resolve/late.rs @@ -16,8 +16,8 @@ use rustc::hir::def::Namespace::{self, *}; use rustc::hir::def::{self, CtorKind, DefKind, PartialRes, PerNS}; use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX}; use rustc::hir::TraitCandidate; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; use rustc::{bug, lint, span_bug}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span::symbol::{kw, sym}; use rustc_span::Span; use smallvec::{smallvec, SmallVec}; diff --git a/src/librustc_resolve/late/diagnostics.rs b/src/librustc_resolve/late/diagnostics.rs index 4a65b097e73b..cd94229b0abc 100644 --- a/src/librustc_resolve/late/diagnostics.rs +++ b/src/librustc_resolve/late/diagnostics.rs @@ -11,7 +11,7 @@ use rustc::hir::def::{self, CtorKind, DefKind}; use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX}; use rustc::hir::PrimTy; use rustc::session::config::nightly_options; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_span::hygiene::MacroKind; use rustc_span::symbol::kw; use rustc_span::Span; diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 420e3d5c6de7..708bf538bdbd 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -20,6 +20,7 @@ pub use rustc::hir::def::{Namespace, PerNS}; use Determinacy::*; +use errors::{Applicability, DiagnosticBuilder}; use rustc::hir::def::Namespace::*; use rustc::hir::def::{self, CtorKind, CtorOf, DefKind, ExportMap, NonMacroAttrKind, PartialRes}; use rustc::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; @@ -32,12 +33,12 @@ use rustc::session::Session; use rustc::span_bug; use rustc::ty::query::Providers; use rustc::ty::{self, DefIdTree, ResolverOutputs}; -use rustc::util::nodemap::{DefIdMap, FxHashMap, FxHashSet, NodeMap, NodeSet}; - -use rustc_metadata::creader::{CStore, CrateLoader}; - -use errors::{Applicability, DiagnosticBuilder}; +use rustc::util::nodemap::{DefIdMap, NodeMap, NodeSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; +use rustc_data_structures::ptr_key::PtrKey; +use rustc_data_structures::sync::Lrc; use rustc_expand::base::SyntaxExtension; +use rustc_metadata::creader::{CStore, CrateLoader}; use rustc_span::hygiene::{ExpnId, ExpnKind, MacroKind, SyntaxContext, Transparency}; use rustc_span::source_map::Spanned; use rustc_span::symbol::{kw, sym}; @@ -51,10 +52,6 @@ use syntax::visit::{self, Visitor}; use syntax::{struct_span_err, unwrap_or}; use log::debug; - -use rustc_data_structures::fx::FxIndexMap; -use rustc_data_structures::ptr_key::PtrKey; -use rustc_data_structures::sync::Lrc; use std::cell::{Cell, RefCell}; use std::collections::BTreeSet; use std::{cmp, fmt, iter, ptr}; diff --git a/src/librustc_resolve/lifetimes.rs b/src/librustc_resolve/lifetimes.rs index e7d6cd2709d7..96f1e069f923 100644 --- a/src/librustc_resolve/lifetimes.rs +++ b/src/librustc_resolve/lifetimes.rs @@ -5,16 +5,20 @@ //! used between functions, and they operate in a purely top-down //! way. Therefore, we break lifetime name resolution into a separate pass. +use errors::{pluralize, Applicability, DiagnosticBuilder}; use rustc::hir::def::{DefKind, Res}; use rustc::hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE}; +use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor}; use rustc::hir::map::Map; +use rustc::hir::{self, GenericParamKind, LifetimeParamKind}; use rustc::hir::{GenericArg, GenericParam, LifetimeName, Node, ParamName, QPath}; -use rustc::ty::{self, DefIdTree, GenericParamDefKind, TyCtxt}; - -use errors::{pluralize, Applicability, DiagnosticBuilder}; use rustc::lint; +use rustc::middle::resolve_lifetime::*; use rustc::session::Session; -use rustc::util::nodemap::{DefIdMap, FxHashMap, FxHashSet, HirIdMap, HirIdSet}; +use rustc::ty::{self, DefIdTree, GenericParamDefKind, TyCtxt}; +use rustc::util::nodemap::{DefIdMap, HirIdMap, HirIdSet}; +use rustc::{bug, span_bug}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span::symbol::{kw, sym}; use rustc_span::Span; use std::borrow::Cow; @@ -22,15 +26,10 @@ use std::cell::Cell; use std::mem::{replace, take}; use syntax::ast; use syntax::attr; - -use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor}; -use rustc::hir::{self, GenericParamKind, LifetimeParamKind}; - -use log::debug; -use rustc::{bug, span_bug}; use syntax::{help, span_err, struct_span_err, walk_list}; -use rustc::middle::resolve_lifetime::*; +use log::debug; + use rustc_error_codes::*; // This counts the no of times a lifetime is used diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs index 4c95607410bd..a2ef6ad70f90 100644 --- a/src/librustc_resolve/macros.rs +++ b/src/librustc_resolve/macros.rs @@ -10,8 +10,8 @@ use rustc::hir::def::{self, DefKind, NonMacroAttrKind}; use rustc::hir::def_id; use rustc::middle::stability; use rustc::session::Session; -use rustc::util::nodemap::FxHashSet; use rustc::{lint, span_bug, ty}; +use rustc_data_structures::fx::FxHashSet; use rustc_expand::base::SyntaxExtension; use rustc_expand::base::{self, Indeterminate, InvocationRes}; use rustc_expand::compile_declarative_macro; diff --git a/src/librustc_traits/dropck_outlives.rs b/src/librustc_traits/dropck_outlives.rs index 46021f8b3991..a0bbc2824336 100644 --- a/src/librustc_traits/dropck_outlives.rs +++ b/src/librustc_traits/dropck_outlives.rs @@ -7,7 +7,7 @@ use rustc::traits::{Normalized, ObligationCause, TraitEngine, TraitEngineExt}; use rustc::ty::query::Providers; use rustc::ty::subst::{InternalSubsts, Subst}; use rustc::ty::{self, ParamEnvAnd, Ty, TyCtxt}; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_span::source_map::{Span, DUMMY_SP}; crate fn provide(p: &mut Providers<'_>) { diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 609ce70057d0..601a46ad345c 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -14,7 +14,6 @@ use crate::middle::resolve_lifetime as rl; use crate::namespace::Namespace; use crate::require_c_abi_if_c_variadic; use crate::util::common::ErrorReported; -use crate::util::nodemap::FxHashMap; use errors::{Applicability, DiagnosticId}; use rustc::lint::builtin::AMBIGUOUS_ASSOCIATED_ITEMS; use rustc::traits; @@ -22,6 +21,7 @@ use rustc::ty::subst::{self, InternalSubsts, Subst, SubstsRef}; use rustc::ty::wf::object_region_bounds; use rustc::ty::{self, Const, DefIdTree, ToPredicate, Ty, TyCtxt, TypeFoldable}; use rustc::ty::{GenericParamDef, GenericParamDefKind}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span::symbol::sym; use rustc_span::{MultiSpan, Span, DUMMY_SP}; use rustc_target::spec::abi; @@ -35,8 +35,6 @@ use std::collections::BTreeSet; use std::iter; use std::slice; -use rustc_data_structures::fx::FxHashSet; - use rustc_error_codes::*; #[derive(Debug)] diff --git a/src/librustc_typeck/check/expr.rs b/src/librustc_typeck/check/expr.rs index 773c9a266599..743a2c6b5439 100644 --- a/src/librustc_typeck/check/expr.rs +++ b/src/librustc_typeck/check/expr.rs @@ -15,7 +15,6 @@ use crate::check::FnCtxt; use crate::check::Needs; use crate::check::TupleArgumentsFlag::DontTupleArguments; use crate::util::common::ErrorReported; -use crate::util::nodemap::FxHashMap; use errors::{pluralize, Applicability, DiagnosticBuilder, DiagnosticId}; use rustc::hir; @@ -31,6 +30,7 @@ use rustc::ty::adjustment::{Adjust, Adjustment, AllowTwoPhase, AutoBorrow, AutoB use rustc::ty::Ty; use rustc::ty::TypeFoldable; use rustc::ty::{AdtKind, Visibility}; +use rustc_data_structures::fx::FxHashMap; use rustc_span::hygiene::DesugaringKind; use rustc_span::source_map::Span; use rustc_span::symbol::{kw, sym, Symbol}; diff --git a/src/librustc_typeck/check/generator_interior.rs b/src/librustc_typeck/check/generator_interior.rs index f63971039bc5..63aadd43a094 100644 --- a/src/librustc_typeck/check/generator_interior.rs +++ b/src/librustc_typeck/check/generator_interior.rs @@ -4,13 +4,13 @@ //! types computed here. use super::FnCtxt; -use crate::util::nodemap::FxHashMap; use rustc::hir::def::{CtorKind, DefKind, Res}; use rustc::hir::def_id::DefId; use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor}; use rustc::hir::{self, Expr, ExprKind, Pat, PatKind}; use rustc::middle::region::{self, YieldData}; use rustc::ty::{self, Ty}; +use rustc_data_structures::fx::FxHashMap; use rustc_span::Span; struct InteriorVisitor<'a, 'tcx> { diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index acf449d384cc..28c84c5c0d02 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -27,7 +27,7 @@ use rustc::ty::GenericParamDefKind; use rustc::ty::{ self, ParamEnvAnd, ToPolyTraitRef, ToPredicate, TraitRef, Ty, TyCtxt, TypeFoldable, }; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::sync::Lrc; use rustc_span::{symbol::Symbol, Span, DUMMY_SP}; use std::cmp::max; diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs index 40ea27df4ffe..fd92e376f61c 100644 --- a/src/librustc_typeck/check/method/suggest.rs +++ b/src/librustc_typeck/check/method/suggest.rs @@ -4,7 +4,6 @@ use crate::check::FnCtxt; use crate::middle::lang_items::FnOnceTraitLangItem; use crate::namespace::Namespace; -use crate::util::nodemap::FxHashSet; use errors::{pluralize, Applicability, DiagnosticBuilder}; use rustc::hir::def::{DefKind, Res}; use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; @@ -14,6 +13,7 @@ use rustc::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use rustc::traits::Obligation; use rustc::ty::print::with_crate_prefix; use rustc::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, TypeFoldable}; +use rustc_data_structures::fx::FxHashSet; use rustc_span::{source_map, FileName, Span}; use syntax::ast; use syntax::util::lev_distance; diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 43e0134ceda4..71a7a5dd69b1 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -117,6 +117,7 @@ use rustc::ty::{ self, AdtKind, CanonicalUserType, Const, GenericParamDefKind, RegionKind, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, UserType, }; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_index::vec::Idx; use rustc_span::hygiene::DesugaringKind; use rustc_span::source_map::{original_sp, DUMMY_SP}; @@ -144,7 +145,7 @@ use crate::session::config::EntryFnType; use crate::session::Session; use crate::util::captures::Captures; use crate::util::common::{indenter, ErrorReported}; -use crate::util::nodemap::{DefIdMap, DefIdSet, FxHashMap, FxHashSet, HirIdMap}; +use crate::util::nodemap::{DefIdMap, DefIdSet, HirIdMap}; use crate::TypeAndSubsts; use self::autoderef::Autoderef; diff --git a/src/librustc_typeck/check/pat.rs b/src/librustc_typeck/check/pat.rs index 251c8427ffd5..8e5e5c39e67d 100644 --- a/src/librustc_typeck/check/pat.rs +++ b/src/librustc_typeck/check/pat.rs @@ -1,5 +1,4 @@ use crate::check::FnCtxt; -use crate::util::nodemap::FxHashMap; use errors::{pluralize, Applicability, DiagnosticBuilder}; use rustc::hir::def::{CtorKind, DefKind, Res}; use rustc::hir::pat_util::EnumerateAndAdjustIterator; @@ -9,6 +8,7 @@ use rustc::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use rustc::traits::Pattern; use rustc::ty::subst::GenericArg; use rustc::ty::{self, BindingMode, Ty, TypeFoldable}; +use rustc_data_structures::fx::FxHashMap; use rustc_span::hygiene::DesugaringKind; use rustc_span::Span; use syntax::ast; diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index 5e2178cf9106..e9df155c9b75 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -8,7 +8,7 @@ use rustc::middle::lang_items; use rustc::traits::{self, ObligationCause, ObligationCauseCode}; use rustc::ty::subst::{InternalSubsts, Subst}; use rustc::ty::{self, AdtKind, GenericParamDefKind, ToPredicate, Ty, TyCtxt, TypeFoldable}; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use errors::DiagnosticBuilder; use rustc_span::symbol::sym; diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 1d20ef2fe073..bc39856e14d7 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -30,7 +30,7 @@ use rustc::ty::util::IntTypeExt; use rustc::ty::{self, AdtKind, Const, DefIdTree, ToPolyTraitRef, Ty, TyCtxt}; use rustc::ty::{ReprOptions, ToPredicate}; use rustc::util::captures::Captures; -use rustc::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_target::spec::abi; use rustc_span::symbol::{kw, sym, Symbol}; diff --git a/src/librustc_typeck/constrained_generic_params.rs b/src/librustc_typeck/constrained_generic_params.rs index 706174041dea..a281c0ae67d2 100644 --- a/src/librustc_typeck/constrained_generic_params.rs +++ b/src/librustc_typeck/constrained_generic_params.rs @@ -1,6 +1,6 @@ use rustc::ty::fold::{TypeFoldable, TypeVisitor}; use rustc::ty::{self, Ty, TyCtxt}; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_span::source_map::Span; #[derive(Clone, PartialEq, Eq, Hash, Debug)] diff --git a/src/librustc_typeck/impl_wf_check.rs b/src/librustc_typeck/impl_wf_check.rs index 82632bbc17c0..770aeb6869a8 100644 --- a/src/librustc_typeck/impl_wf_check.rs +++ b/src/librustc_typeck/impl_wf_check.rs @@ -14,7 +14,7 @@ use rustc::hir::def_id::DefId; use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::ty::query::Providers; use rustc::ty::{self, TyCtxt, TypeFoldable}; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use std::collections::hash_map::Entry::{Occupied, Vacant}; use rustc_span::Span; diff --git a/src/librustc_typeck/outlives/explicit.rs b/src/librustc_typeck/outlives/explicit.rs index f549946a59a7..a922846856db 100644 --- a/src/librustc_typeck/outlives/explicit.rs +++ b/src/librustc_typeck/outlives/explicit.rs @@ -1,6 +1,6 @@ -use crate::util::nodemap::FxHashMap; use rustc::hir::def_id::DefId; use rustc::ty::{self, OutlivesPredicate, TyCtxt}; +use rustc_data_structures::fx::FxHashMap; use super::utils::*; diff --git a/src/librustc_typeck/outlives/implicit_infer.rs b/src/librustc_typeck/outlives/implicit_infer.rs index 9b96506b06e1..b18f89c1a72d 100644 --- a/src/librustc_typeck/outlives/implicit_infer.rs +++ b/src/librustc_typeck/outlives/implicit_infer.rs @@ -3,7 +3,7 @@ use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::hir::{self, Node}; use rustc::ty::subst::{GenericArg, GenericArgKind, Subst}; use rustc::ty::{self, Ty, TyCtxt}; -use rustc::util::nodemap::FxHashMap; +use rustc_data_structures::fx::FxHashMap; use rustc_span::Span; use super::explicit::ExplicitPredicatesMap; diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs index f3b0a6833098..dec019711a01 100644 --- a/src/librustdoc/clean/auto_trait.rs +++ b/src/librustdoc/clean/auto_trait.rs @@ -1,7 +1,7 @@ use rustc::hir; use rustc::traits::auto_trait::{self, AutoTraitResult}; use rustc::ty::{self, Region, RegionVid, TypeFoldable}; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use std::fmt::Debug; diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index 57ec985285d5..49baff065c87 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -11,7 +11,7 @@ use rustc::hir::def::{CtorKind, DefKind, Res}; use rustc::hir::def_id::DefId; use rustc::hir::{self, Mutability}; use rustc::ty; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_metadata::creader::LoadedMacro; use crate::clean::{self, GetDefId, ToSource, TypeKind}; diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 0ba7370f3ebe..fad2bab43b99 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -19,7 +19,7 @@ use rustc::middle::stability; use rustc::ty::fold::TypeFolder; use rustc::ty::subst::InternalSubsts; use rustc::ty::{self, AdtKind, Lift, Ty, TyCtxt}; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_index::vec::{Idx, IndexVec}; use rustc_span::hygiene::MacroKind; use rustc_span::symbol::{kw, sym}; diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 6dd89dbd7f1c..6bb1ef7d1261 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -14,7 +14,7 @@ use rustc::hir::{self, Mutability}; use rustc::middle::lang_items; use rustc::middle::stability; use rustc::ty::layout::VariantIdx; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_index::vec::IndexVec; use rustc_span::hygiene::MacroKind; use rustc_span::source_map::DUMMY_SP; diff --git a/src/librustdoc/clean/utils.rs b/src/librustdoc/clean/utils.rs index be4ae1c91197..d17b3ce0b1bc 100644 --- a/src/librustdoc/clean/utils.rs +++ b/src/librustdoc/clean/utils.rs @@ -15,7 +15,7 @@ use rustc::hir::def_id::{DefId, LOCAL_CRATE}; use rustc::mir::interpret::{sign_extend, ConstValue, Scalar}; use rustc::ty::subst::{GenericArgKind, SubstsRef}; use rustc::ty::{self, DefIdTree, Ty}; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_span; use rustc_span::symbol::{kw, sym, Symbol}; use std::mem; diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index cb22039327e0..8ac9e957d3e7 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -8,7 +8,7 @@ use rustc::session::config::ErrorOutputType; use rustc::session::DiagnosticOutput; use rustc::session::{self, config}; use rustc::ty::{Ty, TyCtxt}; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_driver::abort_on_err; use rustc_feature::UnstableFeatures; use rustc_interface::interface; diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 96b841046ff2..f84fef2761ec 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -11,7 +11,7 @@ use std::fmt; use rustc::hir; use rustc::hir::def_id::DefId; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_target::spec::abi::Abi; use crate::clean::{self, PrimitiveType}; diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index ad059463aa43..c315cefc1b88 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -47,8 +47,8 @@ use rustc::hir::def_id::DefId; use rustc::hir::{self, Mutability}; use rustc::middle::privacy::AccessLevels; use rustc::middle::stability; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; use rustc_data_structures::flock; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_feature::UnstableFeatures; use rustc_span::edition::Edition; use rustc_span::hygiene::MacroKind; diff --git a/src/librustdoc/passes/collect_trait_impls.rs b/src/librustdoc/passes/collect_trait_impls.rs index 63ad9a66a482..d9360f24a787 100644 --- a/src/librustdoc/passes/collect_trait_impls.rs +++ b/src/librustdoc/passes/collect_trait_impls.rs @@ -4,7 +4,7 @@ use crate::core::DocContext; use crate::fold::DocFolder; use rustc::hir::def_id::{DefId, LOCAL_CRATE}; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_span::symbol::sym; pub const COLLECT_TRAIT_IMPLS: Pass = Pass { diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index 959f61644d60..707d9a999e52 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -6,7 +6,7 @@ use rustc::hir::def_id::{DefId, LOCAL_CRATE}; use rustc::hir::{self, Node}; use rustc::middle::privacy::AccessLevel; use rustc::ty::TyCtxt; -use rustc::util::nodemap::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_span::hygiene::MacroKind; use rustc_span::source_map::Spanned; use rustc_span::symbol::sym; diff --git a/src/librustdoc/visit_lib.rs b/src/librustdoc/visit_lib.rs index f8f82e17e8f4..d157a0ca03fd 100644 --- a/src/librustdoc/visit_lib.rs +++ b/src/librustdoc/visit_lib.rs @@ -2,7 +2,7 @@ use rustc::hir::def::{DefKind, Res}; use rustc::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX}; use rustc::middle::privacy::{AccessLevel, AccessLevels}; use rustc::ty::{TyCtxt, Visibility}; -use rustc::util::nodemap::FxHashSet; +use rustc_data_structures::fx::FxHashSet; use rustc_span::symbol::sym; use crate::clean::{AttributesExt, NestedAttributesExt};