diff --git a/src/librustc/dep_graph/dep_node.rs b/src/librustc/dep_graph/dep_node.rs index fdcc1a0db0538..aab8aa19ae57c 100644 --- a/src/librustc/dep_graph/dep_node.rs +++ b/src/librustc/dep_graph/dep_node.rs @@ -49,8 +49,6 @@ //! user of the `DepNode` API of having to know how to compute the expected //! fingerprint for a given set of node parameters. -use crate::hir::map::DefPathHash; -use crate::ich::Fingerprint; use crate::mir; use crate::mir::interpret::{GlobalId, LitToConstInput}; use crate::traits; @@ -62,7 +60,9 @@ use crate::traits::query::{ use crate::ty::subst::SubstsRef; use crate::ty::{self, ParamEnvAnd, Ty, TyCtxt}; +use rustc_data_structures::fingerprint::Fingerprint; use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, CRATE_DEF_INDEX}; +use rustc_hir::definitions::DefPathHash; use rustc_hir::HirId; use rustc_span::symbol::Symbol; use std::hash::Hash; diff --git a/src/librustc/hir/map/collector.rs b/src/librustc/hir/map/collector.rs index c3bc9490d294e..725238f1d1a85 100644 --- a/src/librustc/hir/map/collector.rs +++ b/src/librustc/hir/map/collector.rs @@ -1,5 +1,4 @@ use crate::arena::Arena; -use crate::hir::map::definitions::{self, DefPathHash}; use crate::hir::map::{Entry, HirOwnerData, Map}; use crate::hir::{Owner, OwnerNodes, ParentedNode}; use crate::ich::StableHashingContext; @@ -11,6 +10,7 @@ use rustc_data_structures::svh::Svh; use rustc_hir as hir; use rustc_hir::def_id::CRATE_DEF_INDEX; use rustc_hir::def_id::{LocalDefId, LOCAL_CRATE}; +use rustc_hir::definitions::{self, DefPathHash}; use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor}; use rustc_hir::*; use rustc_index::vec::{Idx, IndexVec}; diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs index eb8e57743b8f8..495c1804044f3 100644 --- a/src/librustc/hir/map/mod.rs +++ b/src/librustc/hir/map/mod.rs @@ -7,9 +7,7 @@ use rustc_ast::ast::{self, Name, NodeId}; use rustc_data_structures::svh::Svh; use rustc_hir::def::{DefKind, Res}; use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE}; -pub use rustc_hir::definitions; -pub use rustc_hir::definitions::{DefKey, DefPath, DefPathData, DefPathHash}; -pub use rustc_hir::definitions::{Definitions, DisambiguatedDefPathData}; +use rustc_hir::definitions::{DefKey, DefPath, Definitions}; use rustc_hir::intravisit; use rustc_hir::itemlikevisit::ItemLikeVisitor; use rustc_hir::print::Nested; diff --git a/src/librustc/ich/hcx.rs b/src/librustc/ich/hcx.rs index ba3763f6ee0bd..a9466e8252de7 100644 --- a/src/librustc/ich/hcx.rs +++ b/src/librustc/ich/hcx.rs @@ -1,5 +1,4 @@ -use crate::hir::map::definitions::{DefPathHash, Definitions}; -use crate::ich::{self, CachingSourceMapView}; +use crate::ich; use crate::middle::cstore::CrateStore; use crate::ty::{fast_reject, TyCtxt}; @@ -9,10 +8,11 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_data_structures::sync::Lrc; use rustc_hir as hir; use rustc_hir::def_id::{DefId, LocalDefId}; +use rustc_hir::definitions::{DefPathHash, Definitions}; use rustc_session::Session; use rustc_span::source_map::SourceMap; use rustc_span::symbol::Symbol; -use rustc_span::{BytePos, SourceFile}; +use rustc_span::{BytePos, CachingSourceMapView, SourceFile}; use smallvec::SmallVec; use std::cmp::Ord; diff --git a/src/librustc/ich/impls_hir.rs b/src/librustc/ich/impls_hir.rs index 1722b29266ad2..f668cc99754f4 100644 --- a/src/librustc/ich/impls_hir.rs +++ b/src/librustc/ich/impls_hir.rs @@ -1,12 +1,13 @@ //! This module contains `HashStable` implementations for various HIR data //! types in no particular order. -use crate::hir::map::DefPathHash; -use crate::ich::{Fingerprint, NodeIdHashingMode, StableHashingContext}; +use crate::ich::{NodeIdHashingMode, StableHashingContext}; use rustc_attr as attr; +use rustc_data_structures::fingerprint::Fingerprint; use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey}; use rustc_hir as hir; use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, CRATE_DEF_INDEX}; +use rustc_hir::definitions::DefPathHash; use smallvec::SmallVec; use std::mem; diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc/ich/impls_ty.rs index 433076bb8342c..41cc8cbaebb6e 100644 --- a/src/librustc/ich/impls_ty.rs +++ b/src/librustc/ich/impls_ty.rs @@ -1,10 +1,11 @@ //! This module contains `HashStable` implementations for various data types //! from rustc::ty in no particular order. -use crate::ich::{Fingerprint, NodeIdHashingMode, StableHashingContext}; +use crate::ich::{NodeIdHashingMode, StableHashingContext}; use crate::middle::region; use crate::mir; use crate::ty; +use rustc_data_structures::fingerprint::Fingerprint; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey}; use std::cell::RefCell; diff --git a/src/librustc/ich/mod.rs b/src/librustc/ich/mod.rs index 2c4618dcd42cf..516e3ed979c7c 100644 --- a/src/librustc/ich/mod.rs +++ b/src/librustc/ich/mod.rs @@ -3,7 +3,6 @@ pub use self::hcx::{ hash_stable_trait_impls, NodeIdHashingMode, StableHashingContext, StableHashingContextProvider, }; -crate use rustc_data_structures::fingerprint::Fingerprint; use rustc_span::symbol::{sym, Symbol}; pub use rustc_span::CachingSourceMapView; diff --git a/src/librustc/middle/cstore.rs b/src/librustc/middle/cstore.rs index 3a9d3c56dcead..012390e8f74b8 100644 --- a/src/librustc/middle/cstore.rs +++ b/src/librustc/middle/cstore.rs @@ -4,7 +4,6 @@ pub use self::NativeLibraryKind::*; -use crate::hir::map::definitions::{DefKey, DefPath, DefPathHash, DefPathTable}; use crate::ty::TyCtxt; use rustc_ast::ast; @@ -12,6 +11,7 @@ use rustc_ast::expand::allocator::AllocatorKind; use rustc_data_structures::svh::Svh; use rustc_data_structures::sync::{self, MetadataRef}; use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE}; +use rustc_hir::definitions::{DefKey, DefPath, DefPathHash, DefPathTable}; use rustc_macros::HashStable; use rustc_session::search_paths::PathKind; pub use rustc_session::utils::NativeLibraryKind; diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index f787195245212..c46ab89d0049c 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -1,6 +1,5 @@ use super::{AllocId, CheckInAllocMsg, Pointer, RawConst, ScalarMaybeUndef}; -use crate::hir::map::definitions::DefPathData; use crate::mir::interpret::ConstValue; use crate::ty::layout::{Align, LayoutError, Size}; use crate::ty::query::TyCtxtAt; @@ -11,6 +10,7 @@ use backtrace::Backtrace; use rustc_data_structures::sync::Lock; use rustc_errors::{struct_span_err, DiagnosticBuilder}; use rustc_hir as hir; +use rustc_hir::definitions::DefPathData; use rustc_macros::HashStable; use rustc_session::CtfeBacktrace; use rustc_span::{def_id::DefId, Pos, Span}; diff --git a/src/librustc/mir/mono.rs b/src/librustc/mir/mono.rs index 27d82d25803c7..0b64cb479d559 100644 --- a/src/librustc/mir/mono.rs +++ b/src/librustc/mir/mono.rs @@ -1,9 +1,10 @@ use crate::dep_graph::{DepConstructor, DepNode, WorkProduct, WorkProductId}; -use crate::ich::{Fingerprint, NodeIdHashingMode, StableHashingContext}; +use crate::ich::{NodeIdHashingMode, StableHashingContext}; use crate::ty::print::obsolete::DefPathBasedNames; use crate::ty::{subst::InternalSubsts, Instance, InstanceDef, SymbolName, TyCtxt}; use rustc_attr::InlineAttr; use rustc_data_structures::base_n; +use rustc_data_structures::fingerprint::Fingerprint; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE}; diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 1dc2f2a6f248b..ef1532bbf2500 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -4,9 +4,6 @@ use crate::arena::Arena; use crate::dep_graph::DepGraph; use crate::dep_graph::{self, DepConstructor}; use crate::hir::exports::Export; -use crate::hir::map as hir_map; -use crate::hir::map::definitions::Definitions; -use crate::hir::map::{DefPathData, DefPathHash}; use crate::ich::{NodeIdHashingMode, StableHashingContext}; use crate::infer::canonical::{Canonical, CanonicalVarInfo, CanonicalVarInfos}; use crate::lint::{struct_lint_level, LintSource}; @@ -56,6 +53,7 @@ use rustc_data_structures::sync::{self, Lock, Lrc, WorkerLocal}; use rustc_hir as hir; use rustc_hir::def::{DefKind, Res}; use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, DefIdSet, LocalDefId, LOCAL_CRATE}; +use rustc_hir::definitions::{DefPathData, DefPathHash, Definitions}; use rustc_hir::{HirId, Node, TraitCandidate}; use rustc_hir::{ItemKind, ItemLocalId, ItemLocalMap, ItemLocalSet}; use rustc_index::vec::{Idx, IndexVec}; @@ -1236,7 +1234,7 @@ impl<'tcx> TyCtxt<'tcx> { self.features_query(LOCAL_CRATE) } - pub fn def_key(self, id: DefId) -> hir_map::DefKey { + pub fn def_key(self, id: DefId) -> rustc_hir::definitions::DefKey { if let Some(id) = id.as_local() { self.hir().def_key(id) } else { self.cstore.def_key(id) } } @@ -1245,7 +1243,7 @@ impl<'tcx> TyCtxt<'tcx> { /// /// Note that if `id` is not local to this crate, the result will /// be a non-local `DefPath`. - pub fn def_path(self, id: DefId) -> hir_map::DefPath { + pub fn def_path(self, id: DefId) -> rustc_hir::definitions::DefPath { if let Some(id) = id.as_local() { self.hir().def_path(id) } else { @@ -1260,7 +1258,7 @@ impl<'tcx> TyCtxt<'tcx> { } #[inline] - pub fn def_path_hash(self, def_id: DefId) -> hir_map::DefPathHash { + pub fn def_path_hash(self, def_id: DefId) -> rustc_hir::definitions::DefPathHash { if let Some(def_id) = def_id.as_local() { self.definitions.def_path_hash(def_id) } else { diff --git a/src/librustc/ty/instance.rs b/src/librustc/ty/instance.rs index ac49feaf8c2bf..fcfee0fea85af 100644 --- a/src/librustc/ty/instance.rs +++ b/src/librustc/ty/instance.rs @@ -166,7 +166,7 @@ impl<'tcx> InstanceDef<'tcx> { /// Note that this is only a hint. See the documentation for /// `generates_cgu_internal_copy` for more information. pub fn requires_inline(&self, tcx: TyCtxt<'tcx>) -> bool { - use crate::hir::map::DefPathData; + use rustc_hir::definitions::DefPathData; let def_id = match *self { ty::InstanceDef::Item(def_id) => def_id, ty::InstanceDef::DropGlue(_, Some(_)) => return false, diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 78b0ee271fb74..43982439d47c8 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -8,8 +8,6 @@ pub use self::Variance::*; use crate::arena::Arena; use crate::hir::exports::ExportMap; -use crate::hir::map as hir_map; -use crate::ich::Fingerprint; use crate::ich::StableHashingContext; use crate::infer::canonical::Canonical; use crate::middle::cstore::CrateStoreDyn; @@ -28,6 +26,7 @@ use rustc_ast::ast::{self, Ident, Name}; use rustc_ast::node_id::{NodeId, NodeMap, NodeSet}; use rustc_attr as attr; use rustc_data_structures::captures::Captures; +use rustc_data_structures::fingerprint::Fingerprint; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxIndexMap; use rustc_data_structures::sorted_map::SortedIndexMultiMap; @@ -124,7 +123,7 @@ mod sty; // Data types pub struct ResolverOutputs { - pub definitions: hir_map::Definitions, + pub definitions: rustc_hir::definitions::Definitions, pub cstore: Box, pub extern_crate_map: NodeMap, pub trait_map: TraitMap, @@ -2986,7 +2985,7 @@ impl<'tcx> TyCtxt<'tcx> { let def_key = self.def_key(id); match def_key.disambiguated_data.data { // The name of a constructor is that of its parent. - hir_map::DefPathData::Ctor => { + rustc_hir::definitions::DefPathData::Ctor => { self.item_name(DefId { krate: id.krate, index: def_key.parent.unwrap() }) } _ => def_key.disambiguated_data.data.get_opt_name().unwrap_or_else(|| { diff --git a/src/librustc/ty/print/mod.rs b/src/librustc/ty/print/mod.rs index 8d784833bd310..a932f334dde68 100644 --- a/src/librustc/ty/print/mod.rs +++ b/src/librustc/ty/print/mod.rs @@ -1,9 +1,9 @@ -use crate::hir::map::{DefPathData, DisambiguatedDefPathData}; use crate::ty::subst::{GenericArg, Subst}; use crate::ty::{self, DefIdTree, Ty, TyCtxt}; use rustc_data_structures::fx::FxHashSet; use rustc_hir::def_id::{CrateNum, DefId}; +use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData}; // `pretty` is a separate module only for organization. mod pretty; diff --git a/src/librustc/ty/print/pretty.rs b/src/librustc/ty/print/pretty.rs index 58bff2f13eb70..8d5d6247f5c05 100644 --- a/src/librustc/ty/print/pretty.rs +++ b/src/librustc/ty/print/pretty.rs @@ -1,18 +1,17 @@ -use crate::hir::map::{DefPathData, DisambiguatedDefPathData}; use crate::middle::cstore::{ExternCrate, ExternCrateSource}; use crate::middle::region; use crate::mir::interpret::{sign_extend, truncate, AllocId, ConstValue, Pointer, Scalar}; use crate::ty::layout::{Integer, IntegerExt, Size}; use crate::ty::subst::{GenericArg, GenericArgKind, Subst}; use crate::ty::{self, DefIdTree, ParamConst, Ty, TyCtxt, TypeFoldable}; -use rustc_hir as hir; -use rustc_hir::def::{DefKind, Namespace}; -use rustc_hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; - use rustc_apfloat::ieee::{Double, Single}; use rustc_apfloat::Float; use rustc_ast::ast; use rustc_attr::{SignedInt, UnsignedInt}; +use rustc_hir as hir; +use rustc_hir::def::{DefKind, Namespace}; +use rustc_hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; +use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData}; use rustc_span::symbol::{kw, Symbol}; use rustc_target::spec::abi::Abi; diff --git a/src/librustc/ty/query/on_disk_cache.rs b/src/librustc/ty/query/on_disk_cache.rs index 781abea75d9f7..155f792bd9d0a 100644 --- a/src/librustc/ty/query/on_disk_cache.rs +++ b/src/librustc/ty/query/on_disk_cache.rs @@ -1,17 +1,17 @@ use crate::dep_graph::{DepNodeIndex, SerializedDepNodeIndex}; -use crate::hir::map::definitions::DefPathHash; -use crate::ich::{CachingSourceMapView, Fingerprint}; use crate::mir::interpret::{AllocDecodingSession, AllocDecodingState}; use crate::mir::{self, interpret}; use crate::ty::codec::{self as ty_codec, TyDecoder, TyEncoder}; use crate::ty::context::TyCtxt; use crate::ty::{self, Ty}; use rustc_ast::ast::Ident; +use rustc_data_structures::fingerprint::Fingerprint; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::sync::{HashMapExt, Lock, Lrc, Once}; use rustc_data_structures::thin_vec::ThinVec; use rustc_errors::Diagnostic; use rustc_hir::def_id::{CrateNum, DefId, DefIndex, LocalDefId, LOCAL_CRATE}; +use rustc_hir::definitions::DefPathHash; use rustc_index::vec::{Idx, IndexVec}; use rustc_serialize::{ opaque, Decodable, Decoder, Encodable, Encoder, SpecializedDecoder, SpecializedEncoder, @@ -20,6 +20,7 @@ use rustc_serialize::{ use rustc_session::{CrateDisambiguator, Session}; use rustc_span::hygiene::{ExpnId, SyntaxContext}; use rustc_span::source_map::{SourceMap, StableSourceFileId}; +use rustc_span::CachingSourceMapView; use rustc_span::{BytePos, SourceFile, Span, DUMMY_SP}; use std::mem; diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index 80a4e552f02d6..3aac03bd49a13 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -667,7 +667,7 @@ impl<'tcx> TyCtxt<'tcx> { dep_node: &DepNode, dep_node_index: DepNodeIndex, ) { - use crate::ich::Fingerprint; + use rustc_data_structures::fingerprint::Fingerprint; assert!( Some(self.dep_graph.fingerprint_of(dep_node_index)) diff --git a/src/librustc/ty/query/profiling_support.rs b/src/librustc/ty/query/profiling_support.rs index 58ace917786cf..0081794051f37 100644 --- a/src/librustc/ty/query/profiling_support.rs +++ b/src/librustc/ty/query/profiling_support.rs @@ -1,4 +1,3 @@ -use crate::hir::map::definitions::DefPathData; use crate::ty::context::TyCtxt; use crate::ty::query::caches::QueryCache; use crate::ty::query::plumbing::QueryState; @@ -6,6 +5,7 @@ use measureme::{StringComponent, StringId}; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::profiling::SelfProfiler; use rustc_hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX, LOCAL_CRATE}; +use rustc_hir::definitions::DefPathData; use std::fmt::Debug; use std::io::Write; diff --git a/src/librustc/ty/trait_def.rs b/src/librustc/ty/trait_def.rs index b0287be65294f..ed9054fcffd91 100644 --- a/src/librustc/ty/trait_def.rs +++ b/src/librustc/ty/trait_def.rs @@ -1,4 +1,3 @@ -use crate::hir::map::DefPathHash; use crate::ich::{self, StableHashingContext}; use crate::traits::specialization_graph; use crate::ty::fast_reject; @@ -6,6 +5,7 @@ use crate::ty::fold::TypeFoldable; use crate::ty::{Ty, TyCtxt}; use rustc_hir as hir; use rustc_hir::def_id::{CrateNum, DefId}; +use rustc_hir::definitions::DefPathHash; use rustc_hir::HirId; use rustc_data_structures::fx::FxHashMap; diff --git a/src/librustc/ty/util.rs b/src/librustc/ty/util.rs index 1f512f1dde7d6..dab367a6639ed 100644 --- a/src/librustc/ty/util.rs +++ b/src/librustc/ty/util.rs @@ -1,6 +1,5 @@ //! Miscellaneous type-system utilities that are too small to deserve their own modules. -use crate::hir::map::DefPathData; use crate::ich::NodeIdHashingMode; use crate::mir::interpret::{sign_extend, truncate}; use crate::ty::layout::{Integer, IntegerExt, Size}; @@ -17,6 +16,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_hir as hir; use rustc_hir::def::DefKind; use rustc_hir::def_id::DefId; +use rustc_hir::definitions::DefPathData; use rustc_macros::HashStable; use rustc_span::Span; use rustc_target::abi::TargetDataLayout; diff --git a/src/librustc_codegen_llvm/debuginfo/namespace.rs b/src/librustc_codegen_llvm/debuginfo/namespace.rs index 55a3540809b48..4e507a569dcd1 100644 --- a/src/librustc_codegen_llvm/debuginfo/namespace.rs +++ b/src/librustc_codegen_llvm/debuginfo/namespace.rs @@ -6,8 +6,8 @@ use rustc::ty::{self, Instance}; use crate::common::CodegenCx; use crate::llvm; use crate::llvm::debuginfo::DIScope; -use rustc::hir::map::DefPathData; use rustc_hir::def_id::DefId; +use rustc_hir::definitions::DefPathData; pub fn mangled_name_of_instance<'a, 'tcx>( cx: &CodegenCx<'a, 'tcx>, diff --git a/src/librustc_infer/infer/error_reporting/mod.rs b/src/librustc_infer/infer/error_reporting/mod.rs index a2ae4f53fb8f2..9c22c38583c33 100644 --- a/src/librustc_infer/infer/error_reporting/mod.rs +++ b/src/librustc_infer/infer/error_reporting/mod.rs @@ -55,7 +55,6 @@ use crate::traits::{ IfExpressionCause, MatchExpressionArmCause, ObligationCause, ObligationCauseCode, }; -use rustc::hir::map; use rustc::middle::region; use rustc::ty::error::TypeError; use rustc::ty::{ @@ -549,7 +548,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { terr: &TypeError<'tcx>, ) { use hir::def_id::CrateNum; - use map::DisambiguatedDefPathData; + use rustc_hir::definitions::DisambiguatedDefPathData; use ty::print::Printer; use ty::subst::GenericArg; diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index 60bb4a661fd01..99ac49454273c 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -5,7 +5,6 @@ use crate::util; use log::{info, log_enabled, warn}; use rustc::arena::Arena; use rustc::dep_graph::DepGraph; -use rustc::hir::map::Definitions; use rustc::middle; use rustc::middle::cstore::{CrateStore, MetadataLoader, MetadataLoaderDyn}; use rustc::ty::steal::Steal; @@ -20,6 +19,7 @@ use rustc_data_structures::{box_region_allow_access, declare_box_region_type, pa use rustc_errors::PResult; use rustc_expand::base::ExtCtxt; use rustc_hir::def_id::{CrateNum, LOCAL_CRATE}; +use rustc_hir::definitions::Definitions; use rustc_hir::Crate; use rustc_lint::LintStore; use rustc_mir as mir; diff --git a/src/librustc_metadata/creader.rs b/src/librustc_metadata/creader.rs index 1f551583b0c86..a807fa6b8d466 100644 --- a/src/librustc_metadata/creader.rs +++ b/src/librustc_metadata/creader.rs @@ -3,7 +3,6 @@ use crate::locator::{CrateLocator, CratePaths}; use crate::rmeta::{CrateDep, CrateMetadata, CrateNumMap, CrateRoot, MetadataBlob}; -use rustc::hir::map::Definitions; use rustc::middle::cstore::DepKind; use rustc::middle::cstore::{CrateSource, ExternCrate, ExternCrateSource, MetadataLoaderDyn}; use rustc::ty::TyCtxt; @@ -14,6 +13,7 @@ use rustc_data_structures::sync::Lrc; use rustc_errors::struct_span_err; use rustc_expand::base::SyntaxExtension; use rustc_hir::def_id::{CrateNum, LOCAL_CRATE}; +use rustc_hir::definitions::Definitions; use rustc_index::vec::IndexVec; use rustc_session::config; use rustc_session::output::validate_crate_name; diff --git a/src/librustc_metadata/rmeta/mod.rs b/src/librustc_metadata/rmeta/mod.rs index 3a4214e916acb..57415c0a6070d 100644 --- a/src/librustc_metadata/rmeta/mod.rs +++ b/src/librustc_metadata/rmeta/mod.rs @@ -2,7 +2,6 @@ use decoder::Metadata; use table::{Table, TableBuilder}; use rustc::hir::exports::Export; -use rustc::hir::map; use rustc::middle::cstore::{DepKind, ForeignModule, LinkagePreference, NativeLibrary}; use rustc::middle::exported_symbols::{ExportedSymbol, SymbolExportLevel}; use rustc::middle::lang_items; @@ -194,7 +193,7 @@ crate struct CrateRoot<'tcx> { native_libraries: Lazy<[NativeLibrary]>, foreign_modules: Lazy<[ForeignModule]>, source_map: Lazy<[rustc_span::SourceFile]>, - def_path_table: Lazy, + def_path_table: Lazy, impls: Lazy<[TraitImpls]>, interpret_alloc_index: Lazy<[u32]>, diff --git a/src/librustc_mir/interpret/intrinsics/type_name.rs b/src/librustc_mir/interpret/intrinsics/type_name.rs index 162387308040d..0d9582c7323cb 100644 --- a/src/librustc_mir/interpret/intrinsics/type_name.rs +++ b/src/librustc_mir/interpret/intrinsics/type_name.rs @@ -1,4 +1,3 @@ -use rustc::hir::map::{DefPathData, DisambiguatedDefPathData}; use rustc::mir::interpret::Allocation; use rustc::ty::{ self, @@ -7,6 +6,7 @@ use rustc::ty::{ Ty, TyCtxt, }; use rustc_hir::def_id::CrateNum; +use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData}; use std::fmt::Write; struct AbsolutePathPrinter<'tcx> { diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 5b112677cf77f..ed304572a0621 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -17,7 +17,6 @@ pub use rustc_hir::def::{Namespace, PerNS}; use Determinacy::*; use rustc::hir::exports::ExportMap; -use rustc::hir::map::{DefKey, Definitions}; use rustc::middle::cstore::{CrateStore, MetadataLoaderDyn}; use rustc::span_bug; use rustc::ty::query::Providers; @@ -38,6 +37,7 @@ use rustc_expand::base::SyntaxExtension; use rustc_hir::def::Namespace::*; use rustc_hir::def::{self, CtorOf, DefKind, NonMacroAttrKind, PartialRes}; use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, CRATE_DEF_INDEX}; +use rustc_hir::definitions::{DefKey, Definitions}; use rustc_hir::PrimTy::{self, Bool, Char, Float, Int, Str, Uint}; use rustc_hir::{GlobMap, TraitMap}; use rustc_metadata::creader::{CStore, CrateLoader}; diff --git a/src/librustc_symbol_mangling/legacy.rs b/src/librustc_symbol_mangling/legacy.rs index 7b082309f34b5..a891d60b0687b 100644 --- a/src/librustc_symbol_mangling/legacy.rs +++ b/src/librustc_symbol_mangling/legacy.rs @@ -1,4 +1,3 @@ -use rustc::hir::map::{DefPathData, DisambiguatedDefPathData}; use rustc::ich::NodeIdHashingMode; use rustc::mir::interpret::{ConstValue, Scalar}; use rustc::ty::print::{PrettyPrinter, Print, Printer}; @@ -7,6 +6,7 @@ use rustc::ty::{self, Instance, Ty, TyCtxt, TypeFoldable}; use rustc::util::common::record_time; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_hir::def_id::CrateNum; +use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData}; use log::debug; diff --git a/src/librustc_symbol_mangling/v0.rs b/src/librustc_symbol_mangling/v0.rs index e22a49061bb19..fb2fde8513ac9 100644 --- a/src/librustc_symbol_mangling/v0.rs +++ b/src/librustc_symbol_mangling/v0.rs @@ -1,4 +1,3 @@ -use rustc::hir::map::{DefPathData, DisambiguatedDefPathData}; use rustc::ty::print::{Print, Printer}; use rustc::ty::subst::{GenericArg, GenericArgKind, Subst}; use rustc::ty::{self, Instance, Ty, TyCtxt, TypeFoldable}; @@ -7,6 +6,7 @@ use rustc_data_structures::base_n; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_hir as hir; use rustc_hir::def_id::{CrateNum, DefId}; +use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData}; use rustc_target::spec::abi::Abi; use std::fmt::Write;