mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-29 21:41:47 +00:00
move Node{Map,Set} -> rustc_session::node_id
This commit is contained in:
parent
f507403517
commit
5ccc1e45bd
@ -3368,6 +3368,7 @@ dependencies = [
|
||||
"rustc_error_codes",
|
||||
"rustc_errors",
|
||||
"rustc_index",
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"smallvec 1.0.0",
|
||||
@ -3808,6 +3809,7 @@ dependencies = [
|
||||
"rustc_expand",
|
||||
"rustc_feature",
|
||||
"rustc_metadata",
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"smallvec 1.0.0",
|
||||
"syntax",
|
||||
|
@ -7,12 +7,12 @@
|
||||
use crate::hir;
|
||||
use crate::hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX, LOCAL_CRATE};
|
||||
use crate::ich::Fingerprint;
|
||||
use crate::session::CrateDisambiguator;
|
||||
use crate::util::nodemap::NodeMap;
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::StableHasher;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_session::node_id::NodeMap;
|
||||
use rustc_session::CrateDisambiguator;
|
||||
use rustc_span::hygiene::ExpnId;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
|
@ -11,13 +11,13 @@ 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::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};
|
||||
use rustc_session::node_id::NodeMap;
|
||||
use rustc_span::source_map::{SourceMap, Spanned};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::{MultiSpan, Span, DUMMY_SP};
|
||||
|
@ -25,10 +25,10 @@ use rustc_data_structures::sync;
|
||||
|
||||
use crate::hir;
|
||||
use crate::lint::builtin::BuiltinLintDiagnostics;
|
||||
use crate::session::{DiagnosticMessageId, Session};
|
||||
use crate::ty::TyCtxt;
|
||||
use crate::util::nodemap::NodeMap;
|
||||
use errors::{DiagnosticBuilder, DiagnosticId};
|
||||
use rustc_session::node_id::NodeMap;
|
||||
use rustc_session::{DiagnosticMessageId, Session};
|
||||
use rustc_span::hygiene::MacroKind;
|
||||
use rustc_span::source_map::{DesugaringKind, ExpnKind, MultiSpan};
|
||||
use rustc_span::symbol::Symbol;
|
||||
|
@ -46,7 +46,7 @@ use crate::ty::{ExistentialPredicate, InferTy, ParamTy, PolyFnSig, Predicate, Pr
|
||||
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::{DefIdMap, DefIdSet, ItemLocalMap, ItemLocalSet};
|
||||
|
||||
use arena::SyncDroplessArena;
|
||||
use errors::DiagnosticBuilder;
|
||||
@ -59,6 +59,7 @@ use rustc_data_structures::stable_hasher::{
|
||||
use rustc_data_structures::sync::{Lock, Lrc, WorkerLocal};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_session::node_id::NodeMap;
|
||||
use rustc_span::source_map::MultiSpan;
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
|
@ -28,11 +28,12 @@ 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, NodeMap, NodeSet};
|
||||
use crate::util::nodemap::DefIdMap;
|
||||
use arena::SyncDroplessArena;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::svh::Svh;
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_session::node_id::{NodeMap, NodeSet};
|
||||
|
||||
use rustc_data_structures::sync::{self, par_iter, Lrc, ParallelIterator};
|
||||
use rustc_serialize::{self, Encodable, Encoder};
|
||||
|
@ -2,11 +2,9 @@
|
||||
|
||||
use crate::hir::def_id::DefId;
|
||||
use crate::hir::{HirId, ItemLocalId};
|
||||
use syntax::ast;
|
||||
|
||||
use rustc_data_structures::define_id_collections;
|
||||
|
||||
define_id_collections!(NodeMap, NodeSet, ast::NodeId);
|
||||
define_id_collections!(DefIdMap, DefIdSet, DefId);
|
||||
define_id_collections!(HirIdMap, HirIdSet, HirId);
|
||||
define_id_collections!(ItemLocalMap, ItemLocalSet, ItemLocalId);
|
||||
|
@ -18,5 +18,6 @@ rustc_index = { path = "../librustc_index" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_error_codes = { path = "../librustc_error_codes" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
|
@ -6,8 +6,8 @@ use rustc::bug;
|
||||
use rustc::hir;
|
||||
use rustc::hir::def::{DefKind, Res};
|
||||
use rustc::hir::def_id::DefId;
|
||||
use rustc::util::nodemap::NodeMap;
|
||||
use rustc_error_codes::*;
|
||||
use rustc_session::node_id::NodeMap;
|
||||
use rustc_span::source_map::{respan, DesugaringKind};
|
||||
use rustc_span::symbol::{kw, sym};
|
||||
use rustc_span::Span;
|
||||
|
@ -47,13 +47,14 @@ use rustc::session::config::nightly_options;
|
||||
use rustc::session::Session;
|
||||
use rustc::util::captures::Captures;
|
||||
use rustc::util::common::FN_OUTPUT_NAME;
|
||||
use rustc::util::nodemap::{DefIdMap, NodeMap};
|
||||
use rustc::util::nodemap::DefIdMap;
|
||||
use rustc::{bug, span_bug};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_error_codes::*;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_session::node_id::NodeMap;
|
||||
use rustc_span::hygiene::ExpnId;
|
||||
use rustc_span::source_map::{respan, DesugaringKind, ExpnData, ExpnKind, Spanned};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
|
@ -24,4 +24,5 @@ rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_feature = { path = "../librustc_feature" }
|
||||
rustc_metadata = { path = "../librustc_metadata" }
|
||||
rustc_error_codes = { path = "../librustc_error_codes" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
|
@ -27,10 +27,9 @@ use crate::imports::ImportDirectiveSubclass;
|
||||
use crate::Resolver;
|
||||
|
||||
use errors::pluralize;
|
||||
|
||||
use rustc::util::nodemap::NodeMap;
|
||||
use rustc::{lint, ty};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_session::node_id::NodeMap;
|
||||
use rustc_span::{MultiSpan, Span, DUMMY_SP};
|
||||
use syntax::ast;
|
||||
use syntax::visit::{self, Visitor};
|
||||
|
@ -33,12 +33,13 @@ use rustc::session::Session;
|
||||
use rustc::span_bug;
|
||||
use rustc::ty::query::Providers;
|
||||
use rustc::ty::{self, DefIdTree, ResolverOutputs};
|
||||
use rustc::util::nodemap::{DefIdMap, NodeMap, NodeSet};
|
||||
use rustc::util::nodemap::DefIdMap;
|
||||
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_session::node_id::{NodeMap, NodeSet};
|
||||
use rustc_span::hygiene::{ExpnId, ExpnKind, MacroKind, SyntaxContext, Transparency};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::{kw, sym};
|
||||
|
@ -10,6 +10,8 @@ rustc_index::newtype_index! {
|
||||
}
|
||||
}
|
||||
|
||||
rustc_data_structures::define_id_collections!(NodeMap, NodeSet, NodeId);
|
||||
|
||||
impl NodeId {
|
||||
pub fn placeholder_from_expn_id(expn_id: ExpnId) -> Self {
|
||||
NodeId::from_u32(expn_id.as_u32())
|
||||
|
Loading…
Reference in New Issue
Block a user