Rename syntax
to rustc_ast
in source code
This commit is contained in:
parent
6054a30370
commit
e08c279eac
291 changed files with 650 additions and 637 deletions
|
@ -42,7 +42,7 @@ that warns about any item named `lintme`.
|
|||
#![feature(plugin_registrar)]
|
||||
#![feature(box_syntax, rustc_private)]
|
||||
|
||||
extern crate syntax;
|
||||
extern crate rustc_ast;
|
||||
|
||||
// Load rustc as a plugin to get macros
|
||||
#[macro_use]
|
||||
|
@ -52,7 +52,7 @@ extern crate rustc_driver;
|
|||
use rustc::lint::{EarlyContext, LintContext, LintPass, EarlyLintPass,
|
||||
EarlyLintPassObject, LintArray};
|
||||
use rustc_driver::plugin::Registry;
|
||||
use syntax::ast;
|
||||
use rustc_ast::ast;
|
||||
|
||||
declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
|
|||
rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_index = { path = "../librustc_index" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_ast = { path = "../librustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
backtrace = "0.3.40"
|
||||
parking_lot = "0.9"
|
||||
|
|
|
@ -131,7 +131,7 @@ macro_rules! arena_types {
|
|||
// HIR types
|
||||
[few] hir_krate: rustc_hir::Crate<$tcx>,
|
||||
[] arm: rustc_hir::Arm<$tcx>,
|
||||
[] attribute: syntax::ast::Attribute,
|
||||
[] attribute: rustc_ast::ast::Attribute,
|
||||
[] block: rustc_hir::Block<$tcx>,
|
||||
[] bare_fn_ty: rustc_hir::BareFnTy<$tcx>,
|
||||
[few] global_asm: rustc_hir::GlobalAsm,
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
use crate::ty::TyCtxt;
|
||||
|
||||
use rustc_ast::ast::NodeId;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::BodyId;
|
||||
use syntax::ast::NodeId;
|
||||
|
||||
/// The `DepGraphSafe` trait is used to specify what kinds of values
|
||||
/// are safe to "leak" into a task. The idea is that this should be
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::ty;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_hir::def::Res;
|
||||
use rustc_hir::def_id::DefIdMap;
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast;
|
||||
|
||||
use std::fmt::Debug;
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
//! for the `Code` associated with a particular NodeId.
|
||||
|
||||
use crate::hir::map::Map;
|
||||
use rustc_ast::ast::{Attribute, Ident};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::intravisit::FnKind;
|
||||
use rustc_hir::{Expr, FnDecl, Node};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{Attribute, Ident};
|
||||
|
||||
/// An FnLikeNode is a Node that is like a fn, in that it has a decl
|
||||
/// and a body (as well as a NodeId, a span, etc).
|
||||
|
|
|
@ -3,6 +3,7 @@ use crate::hir::map::definitions::{self, DefPathHash};
|
|||
use crate::hir::map::{Entry, HirEntryMap, Map};
|
||||
use crate::ich::StableHashingContext;
|
||||
use crate::middle::cstore::CrateStore;
|
||||
use rustc_ast::ast::NodeId;
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
|
@ -16,7 +17,6 @@ use rustc_index::vec::IndexVec;
|
|||
use rustc_session::{CrateDisambiguator, Session};
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::{Span, Symbol, DUMMY_SP};
|
||||
use syntax::ast::NodeId;
|
||||
|
||||
use std::iter::repeat;
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
//! There are also some rather random cases (like const initializer
|
||||
//! expressions) that are mostly just leftovers.
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::node_id::NodeMap;
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::StableHasher;
|
||||
|
@ -14,8 +16,6 @@ use rustc_session::CrateDisambiguator;
|
|||
use rustc_span::hygiene::ExpnId;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast;
|
||||
use syntax::node_id::NodeMap;
|
||||
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt::Write;
|
||||
|
|
|
@ -6,6 +6,7 @@ pub use self::definitions::{
|
|||
use crate::dep_graph::{DepGraph, DepKind, DepNode, DepNodeIndex};
|
||||
use crate::middle::cstore::CrateStoreDyn;
|
||||
use crate::ty::query::Providers;
|
||||
use rustc_ast::ast::{self, Name, NodeId};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::svh::Svh;
|
||||
use rustc_hir::def::{DefKind, Res};
|
||||
|
@ -20,7 +21,6 @@ use rustc_span::source_map::Spanned;
|
|||
use rustc_span::symbol::kw;
|
||||
use rustc_span::Span;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::ast::{self, Name, NodeId};
|
||||
|
||||
pub mod blocks;
|
||||
mod collector;
|
||||
|
|
|
@ -5,6 +5,7 @@ use crate::middle::cstore::CrateStore;
|
|||
use crate::session::Session;
|
||||
use crate::ty::{fast_reject, TyCtxt};
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
|
@ -13,7 +14,6 @@ use rustc_hir::def_id::{DefId, DefIndex};
|
|||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{BytePos, SourceFile};
|
||||
use syntax::ast;
|
||||
|
||||
use smallvec::SmallVec;
|
||||
use std::cmp::Ord;
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
use crate::ich::StableHashingContext;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX};
|
||||
use rustc_span::SourceFile;
|
||||
use syntax::ast;
|
||||
|
||||
use smallvec::SmallVec;
|
||||
|
||||
|
@ -35,7 +35,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for [ast::Attribute] {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'ctx> syntax::HashStableContext for StableHashingContext<'ctx> {
|
||||
impl<'ctx> rustc_ast::HashStableContext for StableHashingContext<'ctx> {
|
||||
fn hash_attr(&mut self, attr: &ast::Attribute, hasher: &mut StableHasher) {
|
||||
// Make sure that these have been filtered out.
|
||||
debug_assert!(!attr.ident().map_or(false, |ident| self.is_ignored_attr(ident.name)));
|
||||
|
|
|
@ -8,6 +8,8 @@ use crate::session::search_paths::PathKind;
|
|||
use crate::session::CrateDisambiguator;
|
||||
use crate::ty::TyCtxt;
|
||||
|
||||
use rustc_ast::ast;
|
||||
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};
|
||||
|
@ -17,8 +19,6 @@ use rustc_span::Span;
|
|||
use rustc_target::spec::Target;
|
||||
use std::any::Any;
|
||||
use std::path::{Path, PathBuf};
|
||||
use syntax::ast;
|
||||
use syntax::expand::allocator::AllocatorKind;
|
||||
|
||||
pub use self::NativeLibraryKind::*;
|
||||
pub use rustc_session::utils::NativeLibraryKind;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
use crate::session::Session;
|
||||
use core::num::IntErrorKind;
|
||||
use rustc::bug;
|
||||
use rustc_ast::ast;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use syntax::ast;
|
||||
|
||||
use rustc_data_structures::sync::Once;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ pub use self::StabilityLevel::*;
|
|||
|
||||
use crate::session::{DiagnosticMessageId, Session};
|
||||
use crate::ty::{self, TyCtxt};
|
||||
use rustc_ast::ast::CRATE_NODE_ID;
|
||||
use rustc_attr::{self as attr, ConstStability, Deprecation, RustcDeprecation, Stability};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||
|
@ -18,7 +19,6 @@ use rustc_session::lint::{BuiltinLintDiagnostics, Lint, LintBuffer};
|
|||
use rustc_session::parse::feature_err_issue;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::{MultiSpan, Span};
|
||||
use syntax::ast::CRATE_NODE_ID;
|
||||
|
||||
use std::num::NonZeroU32;
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@ use super::{
|
|||
|
||||
use crate::ty::layout::{Align, Size};
|
||||
|
||||
use rustc_ast::ast::Mutability;
|
||||
use rustc_data_structures::sorted_map::SortedMap;
|
||||
use rustc_target::abi::HasDataLayout;
|
||||
use std::borrow::Cow;
|
||||
use std::iter;
|
||||
use std::ops::{Deref, DerefMut, Range};
|
||||
use syntax::ast::Mutability;
|
||||
|
||||
// NOTE: When adding new fields, make sure to adjust the `Snapshot` impl in
|
||||
// `src/librustc_mir/interpret/snapshot.rs`.
|
||||
|
|
|
@ -107,6 +107,7 @@ use crate::ty::layout::{self, Size};
|
|||
use crate::ty::subst::GenericArgKind;
|
||||
use crate::ty::{self, Instance, Ty, TyCtxt};
|
||||
use byteorder::{BigEndian, LittleEndian, ReadBytesExt, WriteBytesExt};
|
||||
use rustc_ast::ast::LitKind;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::sync::{HashMapExt, Lock};
|
||||
use rustc_data_structures::tiny_list::TinyList;
|
||||
|
@ -117,7 +118,6 @@ use std::fmt;
|
|||
use std::io;
|
||||
use std::num::NonZeroU32;
|
||||
use std::sync::atomic::{AtomicU32, Ordering};
|
||||
use syntax::ast::LitKind;
|
||||
|
||||
/// Uniquely identifies one of the following:
|
||||
/// - A constant
|
||||
|
|
|
@ -18,6 +18,8 @@ use rustc_hir::def_id::DefId;
|
|||
use rustc_hir::{self, GeneratorKind};
|
||||
|
||||
use polonius_engine::Atom;
|
||||
pub use rustc_ast::ast::Mutability;
|
||||
use rustc_ast::ast::Name;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::graph::dominators::Dominators;
|
||||
use rustc_data_structures::graph::{self, GraphSuccessors};
|
||||
|
@ -32,8 +34,6 @@ use std::fmt::{self, Debug, Display, Formatter, Write};
|
|||
use std::ops::Index;
|
||||
use std::slice;
|
||||
use std::{iter, mem, option, u32};
|
||||
pub use syntax::ast::Mutability;
|
||||
use syntax::ast::Name;
|
||||
|
||||
pub use self::cache::{BodyAndCache, ReadOnlyBodyAndCache};
|
||||
pub use self::query::*;
|
||||
|
|
|
@ -13,11 +13,11 @@ use crate::ty::fold::{TypeFolder, TypeVisitor};
|
|||
use crate::ty::subst::SubstsRef;
|
||||
use crate::ty::{self, AdtKind, List, Ty, TyCtxt};
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use smallvec::SmallVec;
|
||||
use syntax::ast;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Debug;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::ich::{self, StableHashingContext};
|
||||
use crate::ty::fast_reject::SimplifiedType;
|
||||
use crate::ty::{self, TyCtxt};
|
||||
use rustc_ast::ast::Ident;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_hir::def_id::{DefId, DefIdMap};
|
||||
use syntax::ast::Ident;
|
||||
|
||||
/// A per-trait graph of impls in specialization order. At the moment, this
|
||||
/// graph forms a tree rooted with the trait itself, with all other nodes
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
use crate::ty::{self, Ty};
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_macros::HashStable;
|
||||
use syntax::ast;
|
||||
|
||||
/// Types that are represented as ints.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
|
|
|
@ -42,6 +42,9 @@ use crate::ty::{InferConst, ParamConst};
|
|||
use crate::ty::{List, TyKind, TyS};
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc::lint::LintDiagnosticBuilder;
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
use rustc_ast::node_id::NodeMap;
|
||||
use rustc_attr as attr;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::profiling::SelfProfilerRef;
|
||||
|
@ -65,9 +68,6 @@ use rustc_span::source_map::MultiSpan;
|
|||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use rustc_target::spec::abi;
|
||||
use syntax::ast;
|
||||
use syntax::expand::allocator::AllocatorKind;
|
||||
use syntax::node_id::NodeMap;
|
||||
|
||||
use smallvec::SmallVec;
|
||||
use std::any::Any;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::ty::{self, BoundRegion, Region, Ty, TyCtxt};
|
||||
use rustc_ast::ast;
|
||||
use rustc_errors::{pluralize, Applicability, DiagnosticBuilder};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_span::Span;
|
||||
use rustc_target::spec::abi;
|
||||
use syntax::ast;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::fmt;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use crate::ich::StableHashingContext;
|
||||
use crate::ty::{self, Ty, TyCtxt};
|
||||
use rustc_ast::ast;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_hir::def_id::DefId;
|
||||
use std::fmt::Debug;
|
||||
use std::hash::Hash;
|
||||
use std::mem;
|
||||
use syntax::ast;
|
||||
|
||||
use self::SimplifiedTypeGen::*;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::session::{self, DataTypeKind};
|
||||
use crate::ty::{self, subst::SubstsRef, ReprOptions, Ty, TyCtxt, TypeFoldable};
|
||||
|
||||
use rustc_ast::ast::{self, Ident, IntTy, UintTy};
|
||||
use rustc_attr as attr;
|
||||
use rustc_span::DUMMY_SP;
|
||||
use syntax::ast::{self, Ident, IntTy, UintTy};
|
||||
|
||||
use std::cmp;
|
||||
use std::fmt;
|
||||
|
|
|
@ -26,6 +26,8 @@ use crate::ty::layout::VariantIdx;
|
|||
use crate::ty::subst::{InternalSubsts, Subst, SubstsRef};
|
||||
use crate::ty::util::{Discr, IntTypeExt};
|
||||
use crate::ty::walk::TypeWalker;
|
||||
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::fx::FxHashMap;
|
||||
|
@ -44,8 +46,6 @@ use rustc_span::hygiene::ExpnId;
|
|||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::Align;
|
||||
use syntax::ast::{self, Ident, Name};
|
||||
use syntax::node_id::{NodeId, NodeMap, NodeSet};
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::cmp::{self, Ordering};
|
||||
|
|
|
@ -11,10 +11,10 @@ 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_span::symbol::{kw, Symbol};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use syntax::ast;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::collections::BTreeMap;
|
||||
|
|
|
@ -535,11 +535,11 @@ pub unsafe fn handle_deadlock() {
|
|||
let rustc_span_globals =
|
||||
rustc_span::GLOBALS.with(|rustc_span_globals| rustc_span_globals as *const _);
|
||||
let rustc_span_globals = &*rustc_span_globals;
|
||||
let syntax_globals = syntax::attr::GLOBALS.with(|syntax_globals| syntax_globals as *const _);
|
||||
let syntax_globals = rustc_ast::attr::GLOBALS.with(|syntax_globals| syntax_globals as *const _);
|
||||
let syntax_globals = &*syntax_globals;
|
||||
thread::spawn(move || {
|
||||
tls::GCX_PTR.set(gcx_ptr, || {
|
||||
syntax::attr::GLOBALS.set(syntax_globals, || {
|
||||
rustc_ast::attr::GLOBALS.set(syntax_globals, || {
|
||||
rustc_span::GLOBALS
|
||||
.set(rustc_span_globals, || tls::with_global(|tcx| deadlock(tcx, ®istry)))
|
||||
});
|
||||
|
|
|
@ -49,6 +49,7 @@ use rustc_hir::{Crate, HirIdSet, ItemLocalId, TraitCandidate};
|
|||
use rustc_index::vec::IndexVec;
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_attr as attr;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
|
@ -56,7 +57,6 @@ use std::borrow::Cow;
|
|||
use std::convert::TryFrom;
|
||||
use std::ops::Deref;
|
||||
use std::sync::Arc;
|
||||
use syntax::ast;
|
||||
|
||||
#[macro_use]
|
||||
mod plumbing;
|
||||
|
|
|
@ -7,6 +7,7 @@ use crate::session::{CrateDisambiguator, Session};
|
|||
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::fx::FxHashMap;
|
||||
use rustc_data_structures::sync::{HashMapExt, Lock, Lrc, Once};
|
||||
use rustc_data_structures::thin_vec::ThinVec;
|
||||
|
@ -22,7 +23,6 @@ use rustc_span::hygiene::{ExpnId, SyntaxContext};
|
|||
use rustc_span::source_map::{SourceMap, StableSourceFileId};
|
||||
use rustc_span::{BytePos, SourceFile, Span, DUMMY_SP};
|
||||
use std::mem;
|
||||
use syntax::ast::Ident;
|
||||
|
||||
const TAG_FILE_FOOTER: u128 = 0xC0FFEE_C0FFEE_C0FFEE_C0FFEE_C0FFEE;
|
||||
|
||||
|
|
|
@ -260,8 +260,8 @@ CloneTypeFoldableAndLiftImpls! {
|
|||
u64,
|
||||
String,
|
||||
crate::middle::region::Scope,
|
||||
::syntax::ast::FloatTy,
|
||||
::syntax::ast::NodeId,
|
||||
::rustc_ast::ast::FloatTy,
|
||||
::rustc_ast::ast::NodeId,
|
||||
::rustc_span::symbol::Symbol,
|
||||
::rustc_hir::def::Res,
|
||||
::rustc_hir::def_id::DefId,
|
||||
|
|
|
@ -17,6 +17,7 @@ use crate::ty::{
|
|||
};
|
||||
use crate::ty::{List, ParamEnv, ParamEnvAnd, TyS};
|
||||
use polonius_engine::Atom;
|
||||
use rustc_ast::ast::{self, Ident};
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -29,7 +30,6 @@ use std::borrow::Cow;
|
|||
use std::cmp::Ordering;
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Range;
|
||||
use syntax::ast::{self, Ident};
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::ty::TyKind::*;
|
|||
use crate::ty::{self, DefIdTree, GenericParamDefKind, Ty, TyCtxt, TypeFoldable};
|
||||
use crate::util::common::ErrorReported;
|
||||
use rustc_apfloat::Float as _;
|
||||
use rustc_ast::ast;
|
||||
use rustc_attr::{self as attr, SignedInt, UnsignedInt};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
|
@ -21,7 +22,6 @@ use rustc_span::Span;
|
|||
use rustc_target::abi::TargetDataLayout;
|
||||
use smallvec::SmallVec;
|
||||
use std::{cmp, fmt};
|
||||
use syntax::ast;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct Discr<'tcx> {
|
||||
|
|
|
@ -20,5 +20,5 @@ rustc_index = { path = "../librustc_index" }
|
|||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_ast = { path = "../librustc_ast" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
use super::{ImplTraitContext, LoweringContext, ParamMode, ParenthesizedGenericArgs};
|
||||
|
||||
use rustc::bug;
|
||||
use rustc_ast::ast::*;
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::ptr::P as AstP;
|
||||
use rustc_data_structures::thin_vec::ThinVec;
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::Res;
|
||||
use rustc_span::source_map::{respan, DesugaringKind, Span, Spanned};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use syntax::ast::*;
|
||||
use syntax::attr;
|
||||
use syntax::ptr::P as AstP;
|
||||
|
||||
impl<'hir> LoweringContext<'_, 'hir> {
|
||||
fn lower_exprs(&mut self, exprs: &[AstP<Expr>]) -> &'hir [hir::Expr<'hir>] {
|
||||
|
@ -783,7 +783,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
e2: Option<&Expr>,
|
||||
lims: RangeLimits,
|
||||
) -> hir::ExprKind<'hir> {
|
||||
use syntax::ast::RangeLimits::*;
|
||||
use rustc_ast::ast::RangeLimits::*;
|
||||
|
||||
let path = match (e1, e2, lims) {
|
||||
(None, None, HalfOpen) => sym::RangeFull,
|
||||
|
|
|
@ -3,6 +3,10 @@ use super::{ImplTraitContext, ImplTraitPosition, ImplTraitTypeIdVisitor};
|
|||
|
||||
use rustc::arena::Arena;
|
||||
use rustc::bug;
|
||||
use rustc_ast::ast::*;
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::node_id::NodeMap;
|
||||
use rustc_ast::visit::{self, AssocCtxt, Visitor};
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{DefKind, Res};
|
||||
|
@ -11,10 +15,6 @@ use rustc_span::source_map::{respan, DesugaringKind};
|
|||
use rustc_span::symbol::{kw, sym};
|
||||
use rustc_span::Span;
|
||||
use rustc_target::spec::abi;
|
||||
use syntax::ast::*;
|
||||
use syntax::attr;
|
||||
use syntax::node_id::NodeMap;
|
||||
use syntax::visit::{self, AssocCtxt, Visitor};
|
||||
|
||||
use log::debug;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
|
|
@ -39,6 +39,14 @@ use rustc::dep_graph::DepGraph;
|
|||
use rustc::hir::map::definitions::{DefKey, DefPathData, Definitions};
|
||||
use rustc::hir::map::Map;
|
||||
use rustc::{bug, span_bug};
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::ast::*;
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::node_id::NodeMap;
|
||||
use rustc_ast::token::{self, Nonterminal, Token};
|
||||
use rustc_ast::tokenstream::{TokenStream, TokenTree};
|
||||
use rustc_ast::visit::{self, AssocCtxt, Visitor};
|
||||
use rustc_ast::walk_list;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
|
@ -58,14 +66,6 @@ use rustc_span::hygiene::ExpnId;
|
|||
use rustc_span::source_map::{respan, DesugaringKind, ExpnData, ExpnKind};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast;
|
||||
use syntax::ast::*;
|
||||
use syntax::attr;
|
||||
use syntax::node_id::NodeMap;
|
||||
use syntax::token::{self, Nonterminal, Token};
|
||||
use syntax::tokenstream::{TokenStream, TokenTree};
|
||||
use syntax::visit::{self, AssocCtxt, Visitor};
|
||||
use syntax::walk_list;
|
||||
|
||||
use log::{debug, trace};
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use super::{ImplTraitContext, LoweringContext, ParamMode};
|
||||
|
||||
use rustc_ast::ast::*;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::Res;
|
||||
use rustc_span::{source_map::Spanned, Span};
|
||||
use syntax::ast::*;
|
||||
use syntax::ptr::P;
|
||||
|
||||
impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
crate fn lower_pat(&mut self, p: &Pat) -> &'hir hir::Pat<'hir> {
|
||||
|
|
|
@ -3,6 +3,7 @@ use super::{GenericArgsCtor, ParenthesizedGenericArgs};
|
|||
|
||||
use rustc::lint::builtin::ELIDED_LIFETIMES_IN_PATHS;
|
||||
use rustc::span_bug;
|
||||
use rustc_ast::ast::{self, *};
|
||||
use rustc_errors::{struct_span_err, Applicability};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{DefKind, PartialRes, Res};
|
||||
|
@ -10,7 +11,6 @@ use rustc_hir::def_id::DefId;
|
|||
use rustc_hir::GenericArg;
|
||||
use rustc_session::lint::BuiltinLintDiagnostics;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, *};
|
||||
|
||||
use log::debug;
|
||||
use smallvec::smallvec;
|
||||
|
|
|
@ -18,4 +18,4 @@ rustc_feature = { path = "../librustc_feature" }
|
|||
rustc_parse = { path = "../librustc_parse" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_ast = { path = "../librustc_ast" }
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
// This pass is supposed to perform only simple checks not requiring name resolution
|
||||
// or type checking or some other kind of complex analysis.
|
||||
|
||||
use rustc_ast::ast::*;
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::expand::is_proc_macro_attr;
|
||||
use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
|
||||
use rustc_ast::walk_list;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_errors::{error_code, struct_span_err, Applicability};
|
||||
|
@ -16,11 +21,6 @@ use rustc_session::Session;
|
|||
use rustc_span::symbol::{kw, sym};
|
||||
use rustc_span::Span;
|
||||
use std::mem;
|
||||
use syntax::ast::*;
|
||||
use syntax::attr;
|
||||
use syntax::expand::is_proc_macro_attr;
|
||||
use syntax::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
|
||||
use syntax::walk_list;
|
||||
|
||||
const MORE_EXTERN: &str =
|
||||
"for more information, visit https://doc.rust-lang.org/std/keyword.extern.html";
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
use rustc_ast::ast::{self, AssocTyConstraint, AssocTyConstraintKind, NodeId};
|
||||
use rustc_ast::ast::{GenericParam, GenericParamKind, PatKind, RangeEnd, VariantData};
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
|
||||
use rustc_errors::{struct_span_err, Handler};
|
||||
use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP};
|
||||
use rustc_feature::{Features, GateIssue, UnstableFeatures};
|
||||
|
@ -5,10 +9,6 @@ use rustc_session::parse::{feature_err, feature_err_issue, ParseSess};
|
|||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, AssocTyConstraint, AssocTyConstraintKind, NodeId};
|
||||
use syntax::ast::{GenericParam, GenericParamKind, PatKind, RangeEnd, VariantData};
|
||||
use syntax::attr;
|
||||
use syntax::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
|
||||
|
||||
use log::debug;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Simply gives a rought count of the number of nodes in an AST.
|
||||
|
||||
use rustc_ast::ast::*;
|
||||
use rustc_ast::visit::*;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::*;
|
||||
use syntax::visit::*;
|
||||
|
||||
pub struct NodeCounter {
|
||||
pub count: usize,
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
use std::str::FromStr;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::visit;
|
||||
use syntax::visit::Visitor;
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::visit;
|
||||
use rustc_ast::visit::Visitor;
|
||||
|
||||
enum Mode {
|
||||
Expression,
|
||||
|
|
|
@ -13,4 +13,4 @@ doctest = false
|
|||
log = "0.4"
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_ast = { path = "../librustc_ast" }
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
use crate::pp::Breaks::{Consistent, Inconsistent};
|
||||
use crate::pp::{self, Breaks};
|
||||
|
||||
use rustc_ast::ast::{self, BlockCheckMode, PatKind, RangeEnd, RangeSyntax};
|
||||
use rustc_ast::ast::{Attribute, GenericArg, MacArgs};
|
||||
use rustc_ast::ast::{GenericBound, SelfKind, TraitBoundModifier};
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token::{self, BinOpToken, DelimToken, Nonterminal, Token, TokenKind};
|
||||
use rustc_ast::tokenstream::{self, TokenStream, TokenTree};
|
||||
use rustc_ast::util::parser::{self, AssocOp, Fixity};
|
||||
use rustc_ast::util::{classify, comments};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::source_map::{SourceMap, Spanned};
|
||||
use rustc_span::symbol::{kw, sym, IdentPrinter};
|
||||
use rustc_span::{BytePos, FileName, Span};
|
||||
use syntax::ast::{self, BlockCheckMode, PatKind, RangeEnd, RangeSyntax};
|
||||
use syntax::ast::{Attribute, GenericArg, MacArgs};
|
||||
use syntax::ast::{GenericBound, SelfKind, TraitBoundModifier};
|
||||
use syntax::attr;
|
||||
use syntax::ptr::P;
|
||||
use syntax::token::{self, BinOpToken, DelimToken, Nonterminal, Token, TokenKind};
|
||||
use syntax::tokenstream::{self, TokenStream, TokenTree};
|
||||
use syntax::util::parser::{self, AssocOp, Fixity};
|
||||
use syntax::util::{classify, comments};
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use super::*;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::with_default_globals;
|
||||
use rustc_span;
|
||||
use rustc_span::source_map::respan;
|
||||
use syntax::ast;
|
||||
use syntax::with_default_globals;
|
||||
|
||||
fn fun_to_string(
|
||||
decl: &ast::FnDecl,
|
||||
|
|
|
@ -19,4 +19,4 @@ rustc_feature = { path = "../librustc_feature" }
|
|||
rustc_macros = { path = "../librustc_macros" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_ast = { path = "../librustc_ast" }
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use super::{find_by_name, mark_used};
|
||||
|
||||
use rustc_ast::ast::{self, Attribute, MetaItem, MetaItemKind, NestedMetaItem};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_errors::{struct_span_err, Applicability, Handler};
|
||||
use rustc_feature::{find_gated_cfg, is_builtin_attr_name, Features, GatedCfg};
|
||||
|
@ -10,7 +11,6 @@ use rustc_session::parse::{feature_err, ParseSess};
|
|||
use rustc_span::hygiene::Transparency;
|
||||
use rustc_span::{symbol::sym, symbol::Symbol, Span};
|
||||
use std::num::NonZeroU32;
|
||||
use syntax::ast::{self, Attribute, MetaItem, MetaItemKind, NestedMetaItem};
|
||||
|
||||
pub fn is_builtin_attr(attr: &Attribute) -> bool {
|
||||
attr.is_doc_comment() || attr.ident().filter(|ident| is_builtin_attr_name(ident.name)).is_some()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! Functions and types dealing with attributes and meta items.
|
||||
//!
|
||||
//! FIXME(Centril): For now being, much of the logic is still in `syntax::attr`.
|
||||
//! FIXME(Centril): For now being, much of the logic is still in `rustc_ast::attr`.
|
||||
//! The goal is to move the definition of `MetaItem` and things that don't need to be in `syntax`
|
||||
//! to this crate.
|
||||
|
||||
|
@ -11,6 +11,6 @@ pub use IntType::*;
|
|||
pub use ReprAttr::*;
|
||||
pub use StabilityLevel::*;
|
||||
|
||||
pub use syntax::attr::*;
|
||||
pub use rustc_ast::attr::*;
|
||||
|
||||
pub(crate) use syntax::HashStableContext;
|
||||
pub(crate) use rustc_ast::HashStableContext;
|
||||
|
|
|
@ -21,6 +21,6 @@ rustc_parse = { path = "../librustc_parse" }
|
|||
rustc_target = { path = "../librustc_target" }
|
||||
rustc_session = { path = "../librustc_session" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_ast = { path = "../librustc_ast" }
|
||||
rustc_expand = { path = "../librustc_expand" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
//
|
||||
use State::*;
|
||||
|
||||
use rustc_ast::ast::{self, AsmDialect};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token::{self, Token};
|
||||
use rustc_ast::tokenstream::{self, TokenStream};
|
||||
use rustc_errors::{struct_span_err, DiagnosticBuilder, PResult};
|
||||
use rustc_expand::base::*;
|
||||
use rustc_parse::parser::Parser;
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, AsmDialect};
|
||||
use syntax::ptr::P;
|
||||
use syntax::token::{self, Token};
|
||||
use syntax::tokenstream::{self, TokenStream};
|
||||
|
||||
enum State {
|
||||
Asm,
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
use rustc_errors::{Applicability, DiagnosticBuilder};
|
||||
|
||||
use rustc_ast::ast::{self, *};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token::{self, TokenKind};
|
||||
use rustc_ast::tokenstream::{DelimSpan, TokenStream, TokenTree};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_expand::base::*;
|
||||
use rustc_parse::parser::Parser;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use syntax::ast::{self, *};
|
||||
use syntax::ptr::P;
|
||||
use syntax::token::{self, TokenKind};
|
||||
use syntax::tokenstream::{DelimSpan, TokenStream, TokenTree};
|
||||
|
||||
pub fn expand_assert<'cx>(
|
||||
cx: &'cx mut ExtCtxt<'_>,
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
//! a literal `true` or `false` based on whether the given cfg matches the
|
||||
//! current compilation environment.
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::token;
|
||||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_attr as attr;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_expand::base::{self, *};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast;
|
||||
use syntax::token;
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
pub fn expand_cfg(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//! Attributes injected into the crate root from command line using `-Z crate-attr`.
|
||||
|
||||
use rustc_ast::ast::{self, AttrItem, AttrStyle};
|
||||
use rustc_ast::attr::mk_attr;
|
||||
use rustc_ast::token;
|
||||
use rustc_expand::panictry;
|
||||
use rustc_session::parse::ParseSess;
|
||||
use rustc_span::FileName;
|
||||
use syntax::ast::{self, AttrItem, AttrStyle};
|
||||
use syntax::attr::mk_attr;
|
||||
use syntax::token;
|
||||
|
||||
pub fn inject(mut krate: ast::Crate, parse_sess: &ParseSess, attrs: &[String]) -> ast::Crate {
|
||||
for raw_attr in attrs {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// The compiler code necessary to support the compile_error! extension.
|
||||
|
||||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_expand::base::{self, *};
|
||||
use rustc_span::Span;
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
pub fn expand_compile_error<'cx>(
|
||||
cx: &'cx mut ExtCtxt<'_>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_ast::ast;
|
||||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_expand::base::{self, DummyResult};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use syntax::ast;
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
use std::string::String;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use rustc_ast::ast;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token::{self, Token};
|
||||
use rustc_ast::tokenstream::{TokenStream, TokenTree};
|
||||
use rustc_expand::base::{self, *};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast;
|
||||
use syntax::ptr::P;
|
||||
use syntax::token::{self, Token};
|
||||
use syntax::tokenstream::{TokenStream, TokenTree};
|
||||
|
||||
pub fn expand_concat_idents<'cx>(
|
||||
cx: &'cx mut ExtCtxt<'_>,
|
||||
|
|
|
@ -2,9 +2,9 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::path_std;
|
||||
|
||||
use rustc_ast::ast::MetaItem;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::MetaItem;
|
||||
|
||||
pub fn expand_deriving_copy(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -2,11 +2,11 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::path_std;
|
||||
|
||||
use rustc_ast::ast::{self, Expr, GenericArg, Generics, ItemKind, MetaItem, VariantData};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, Expr, GenericArg, Generics, ItemKind, MetaItem, VariantData};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_clone(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -2,11 +2,11 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::path_std;
|
||||
|
||||
use rustc_ast::ast::{self, Expr, GenericArg, Ident, MetaItem};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, Expr, GenericArg, Ident, MetaItem};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_eq(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
@ -16,8 +16,8 @@ pub fn expand_deriving_eq(
|
|||
push: &mut dyn FnMut(Annotatable),
|
||||
) {
|
||||
let inline = cx.meta_word(span, sym::inline);
|
||||
let hidden = syntax::attr::mk_nested_word_item(Ident::new(sym::hidden, span));
|
||||
let doc = syntax::attr::mk_list_item(Ident::new(sym::doc, span), vec![hidden]);
|
||||
let hidden = rustc_ast::attr::mk_nested_word_item(Ident::new(sym::hidden, span));
|
||||
let doc = rustc_ast::attr::mk_list_item(Ident::new(sym::doc, span), vec![hidden]);
|
||||
let attrs = vec![cx.attribute(inline), cx.attribute(doc)];
|
||||
let trait_def = TraitDef {
|
||||
span,
|
||||
|
|
|
@ -2,11 +2,11 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::path_std;
|
||||
|
||||
use rustc_ast::ast::{self, Expr, MetaItem};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, Expr, MetaItem};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_ord(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -2,11 +2,11 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::{path_local, path_std};
|
||||
|
||||
use rustc_ast::ast::{BinOpKind, Expr, MetaItem};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{BinOpKind, Expr, MetaItem};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_partial_eq(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -4,11 +4,11 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::{path_local, path_std, pathvec_std};
|
||||
|
||||
use rustc_ast::ast::{self, BinOpKind, Expr, MetaItem};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, BinOpKind, Expr, MetaItem};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_partial_ord(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -2,12 +2,12 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::path_std;
|
||||
|
||||
use rustc_ast::ast::{self, Ident};
|
||||
use rustc_ast::ast::{Expr, MetaItem};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use syntax::ast::{self, Ident};
|
||||
use syntax::ast::{Expr, MetaItem};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_debug(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -4,12 +4,12 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::pathvec_std;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::ast::{Expr, MetaItem, Mutability};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast;
|
||||
use syntax::ast::{Expr, MetaItem, Mutability};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_rustc_decodable(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -2,12 +2,12 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::path_std;
|
||||
|
||||
use rustc_ast::ast::{Expr, MetaItem};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_expand::base::{Annotatable, DummyResult, ExtCtxt};
|
||||
use rustc_span::symbol::{kw, sym};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{Expr, MetaItem};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_default(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -89,11 +89,11 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::pathvec_std;
|
||||
|
||||
use rustc_ast::ast::{Expr, ExprKind, MetaItem, Mutability};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{Expr, ExprKind, MetaItem, Mutability};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_rustc_encodable(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -181,16 +181,16 @@ use std::cell::RefCell;
|
|||
use std::iter;
|
||||
use std::vec;
|
||||
|
||||
use rustc_ast::ast::{self, BinOpKind, EnumDef, Expr, Generics, Ident, PatKind};
|
||||
use rustc_ast::ast::{GenericArg, GenericParamKind, VariantData};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::util::map_in_place::MapInPlace;
|
||||
use rustc_attr as attr;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_session::parse::ParseSess;
|
||||
use rustc_span::source_map::respan;
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, BinOpKind, EnumDef, Expr, Generics, Ident, PatKind};
|
||||
use syntax::ast::{GenericArg, GenericParamKind, VariantData};
|
||||
use syntax::ptr::P;
|
||||
use syntax::util::map_in_place::MapInPlace;
|
||||
|
||||
use ty::{LifetimeBounds, Path, Ptr, PtrTy, Self_, Ty};
|
||||
|
||||
|
@ -339,7 +339,7 @@ fn find_type_parameters(
|
|||
ty_param_names: &[ast::Name],
|
||||
cx: &ExtCtxt<'_>,
|
||||
) -> Vec<P<ast::Ty>> {
|
||||
use syntax::visit;
|
||||
use rustc_ast::visit;
|
||||
|
||||
struct Visitor<'a, 'b> {
|
||||
cx: &'a ExtCtxt<'b>,
|
||||
|
@ -689,11 +689,11 @@ impl<'a> TraitDef<'a> {
|
|||
attr::mark_used(&attr);
|
||||
let opt_trait_ref = Some(trait_ref);
|
||||
let unused_qual = {
|
||||
let word = syntax::attr::mk_nested_word_item(Ident::new(
|
||||
let word = rustc_ast::attr::mk_nested_word_item(Ident::new(
|
||||
Symbol::intern("unused_qualifications"),
|
||||
self.span,
|
||||
));
|
||||
let list = syntax::attr::mk_list_item(Ident::new(sym::allow, self.span), vec![word]);
|
||||
let list = rustc_ast::attr::mk_list_item(Ident::new(sym::allow, self.span), vec![word]);
|
||||
cx.attribute(list)
|
||||
};
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
pub use PtrTy::*;
|
||||
pub use Ty::*;
|
||||
|
||||
use rustc_ast::ast::{self, Expr, GenericArg, GenericParamKind, Generics, Ident, SelfKind};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::ExtCtxt;
|
||||
use rustc_span::source_map::{respan, DUMMY_SP};
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, Expr, GenericArg, GenericParamKind, Generics, Ident, SelfKind};
|
||||
use syntax::ptr::P;
|
||||
|
||||
/// The types of pointers
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -2,11 +2,11 @@ use crate::deriving::generic::ty::*;
|
|||
use crate::deriving::generic::*;
|
||||
use crate::deriving::{self, path_std, pathvec_std};
|
||||
|
||||
use rustc_ast::ast::{Expr, MetaItem, Mutability};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{Expr, MetaItem, Mutability};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand_deriving_hash(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
//! The compiler code necessary to implement the `#[derive]` extensions.
|
||||
|
||||
use rustc_ast::ast::{self, ItemKind, MetaItem};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt, MultiItemModifier};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, ItemKind, MetaItem};
|
||||
use syntax::ptr::P;
|
||||
|
||||
macro path_local($x:ident) {
|
||||
generic::ty::Path::new_local(stringify!($x))
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
// interface.
|
||||
//
|
||||
|
||||
use rustc_ast::ast::{self, GenericArg, Ident};
|
||||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_expand::base::{self, *};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, GenericArg, Ident};
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
use std::env;
|
||||
|
||||
|
|
|
@ -3,15 +3,15 @@ use Position::*;
|
|||
|
||||
use fmt_macros as parse;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token;
|
||||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_errors::{pluralize, Applicability, DiagnosticBuilder};
|
||||
use rustc_expand::base::{self, *};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::{MultiSpan, Span};
|
||||
use syntax::ast;
|
||||
use syntax::ptr::P;
|
||||
use syntax::token;
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::collections::hash_map::Entry;
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
use crate::util::check_builtin_macro_attribute;
|
||||
|
||||
use rustc_ast::ast::{self, Attribute, Expr, FnHeader, FnSig, Generics, Ident, Param};
|
||||
use rustc_ast::ast::{ItemKind, Mutability, Stmt, Ty, TyKind, Unsafe};
|
||||
use rustc_ast::expand::allocator::{
|
||||
AllocatorKind, AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS,
|
||||
};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast::{self, Attribute, Expr, FnHeader, FnSig, Generics, Ident, Param};
|
||||
use syntax::ast::{ItemKind, Mutability, Stmt, Ty, TyKind, Unsafe};
|
||||
use syntax::expand::allocator::{AllocatorKind, AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS};
|
||||
use syntax::ptr::P;
|
||||
|
||||
pub fn expand(
|
||||
ecx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
//! LLVM's `module asm "some assembly here"`. All of LLVM's caveats
|
||||
//! therefore apply.
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token;
|
||||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_errors::DiagnosticBuilder;
|
||||
use rustc_expand::base::{self, *};
|
||||
use rustc_span::source_map::respan;
|
||||
use rustc_span::Span;
|
||||
use smallvec::smallvec;
|
||||
use syntax::ast;
|
||||
use syntax::ptr::P;
|
||||
use syntax::token;
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
pub fn expand_global_asm<'cx>(
|
||||
cx: &'cx mut ExtCtxt<'_>,
|
||||
|
|
|
@ -13,11 +13,11 @@ extern crate proc_macro;
|
|||
|
||||
use crate::deriving::*;
|
||||
|
||||
use rustc_ast::ast::Ident;
|
||||
use rustc_expand::base::{MacroExpanderFn, Resolver, SyntaxExtension, SyntaxExtensionKind};
|
||||
use rustc_expand::proc_macro::BangProcMacro;
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::symbol::sym;
|
||||
use syntax::ast::Ident;
|
||||
|
||||
mod asm;
|
||||
mod assert;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_expand::base;
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
pub fn expand_log_syntax<'cx>(
|
||||
_cx: &'cx mut base::ExtCtxt<'_>,
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
use std::mem;
|
||||
|
||||
use rustc_ast::ast::{self, Ident, NodeId};
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::expand::is_proc_macro_attr;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::visit::{self, Visitor};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_expand::base::{ExtCtxt, Resolver};
|
||||
use rustc_expand::expand::{AstFragment, ExpansionConfig};
|
||||
|
@ -9,11 +14,6 @@ use rustc_span::symbol::{kw, sym};
|
|||
use rustc_span::{Span, DUMMY_SP};
|
||||
use smallvec::smallvec;
|
||||
use std::cell::RefCell;
|
||||
use syntax::ast::{self, Ident, NodeId};
|
||||
use syntax::attr;
|
||||
use syntax::expand::is_proc_macro_attr;
|
||||
use syntax::ptr::P;
|
||||
use syntax::visit::{self, Visitor};
|
||||
|
||||
struct ProcMacroDerive {
|
||||
id: NodeId,
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
use rustc_ast::ast;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token;
|
||||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_expand::base::{self, *};
|
||||
use rustc_expand::panictry;
|
||||
|
@ -5,10 +9,6 @@ use rustc_parse::{self, new_sub_parser_from_file, parser::Parser, DirectoryOwner
|
|||
use rustc_session::lint::builtin::INCOMPLETE_INCLUDE;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{self, Pos, Span};
|
||||
use syntax::ast;
|
||||
use syntax::ptr::P;
|
||||
use syntax::token;
|
||||
use syntax::tokenstream::TokenStream;
|
||||
|
||||
use smallvec::SmallVec;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::{ast, attr};
|
||||
use rustc_expand::base::{ExtCtxt, Resolver};
|
||||
use rustc_expand::expand::ExpansionConfig;
|
||||
use rustc_session::parse::ParseSess;
|
||||
|
@ -5,8 +7,6 @@ use rustc_span::edition::Edition;
|
|||
use rustc_span::hygiene::AstPass;
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::DUMMY_SP;
|
||||
use syntax::ptr::P;
|
||||
use syntax::{ast, attr};
|
||||
|
||||
pub fn inject(
|
||||
mut krate: ast::Crate,
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
/// Ideally, this code would be in libtest but for efficiency and error messages it lives here.
|
||||
use crate::util::check_builtin_macro_attribute;
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_expand::base::*;
|
||||
use rustc_span::source_map::respan;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
|
||||
use std::iter;
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Code that generates a test runner to run all the tests in a crate
|
||||
|
||||
use log::debug;
|
||||
use rustc_ast::ast::{self, Ident};
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::entry::{self, EntryPointType};
|
||||
use rustc_ast::mut_visit::{ExpectOne, *};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{ExtCtxt, Resolver};
|
||||
use rustc_expand::expand::{AstFragment, ExpansionConfig};
|
||||
use rustc_feature::Features;
|
||||
|
@ -11,11 +16,6 @@ use rustc_span::symbol::{sym, Symbol};
|
|||
use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use syntax::ast::{self, Ident};
|
||||
use syntax::attr;
|
||||
use syntax::entry::{self, EntryPointType};
|
||||
use syntax::mut_visit::{ExpectOne, *};
|
||||
use syntax::ptr::P;
|
||||
|
||||
use std::{iter, mem};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_ast::tokenstream::{TokenStream, TokenTree};
|
||||
use rustc_expand::base::{self, ExtCtxt};
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::Span;
|
||||
use syntax::tokenstream::{TokenStream, TokenTree};
|
||||
|
||||
pub fn expand_trace_macros(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use rustc_ast::ast::MetaItem;
|
||||
use rustc_expand::base::ExtCtxt;
|
||||
use rustc_feature::AttributeTemplate;
|
||||
use rustc_parse::validate_attr;
|
||||
use rustc_span::Symbol;
|
||||
use syntax::ast::MetaItem;
|
||||
|
||||
pub fn check_builtin_macro_attribute(ecx: &ExtCtxt<'_>, meta_item: &MetaItem, name: Symbol) {
|
||||
// All the built-in macro attributes are "words" at the moment.
|
||||
|
|
|
@ -33,5 +33,5 @@ rustc_session = { path = "../librustc_session" }
|
|||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_ast = { path = "../librustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
|
|
|
@ -4,7 +4,7 @@ use crate::attributes;
|
|||
use libc::c_uint;
|
||||
use rustc::bug;
|
||||
use rustc::ty::TyCtxt;
|
||||
use syntax::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS};
|
||||
use rustc_ast::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS};
|
||||
|
||||
use crate::llvm::{self, False, True};
|
||||
use crate::ModuleLlvm;
|
||||
|
|
|
@ -134,7 +134,7 @@ fn inline_asm_call(
|
|||
output: &'ll llvm::Type,
|
||||
volatile: bool,
|
||||
alignstack: bool,
|
||||
dia: ::syntax::ast::AsmDialect,
|
||||
dia: ::rustc_ast::ast::AsmDialect,
|
||||
) -> Option<&'ll Value> {
|
||||
let volatile = if volatile { llvm::True } else { llvm::False };
|
||||
let alignstack = if alignstack { llvm::True } else { llvm::False };
|
||||
|
|
|
@ -303,8 +303,8 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
rhs: Self::Value,
|
||||
) -> (Self::Value, Self::Value) {
|
||||
use rustc::ty::{Int, Uint};
|
||||
use syntax::ast::IntTy::*;
|
||||
use syntax::ast::UintTy::*;
|
||||
use rustc_ast::ast::IntTy::*;
|
||||
use rustc_ast::ast::UintTy::*;
|
||||
|
||||
let new_kind = match ty.kind {
|
||||
Int(t @ Isize) => Int(t.normalize(self.tcx.sess.target.ptr_width)),
|
||||
|
|
|
@ -18,8 +18,8 @@ use rustc_codegen_ssa::mir::place::PlaceRef;
|
|||
|
||||
use libc::{c_char, c_uint};
|
||||
|
||||
use rustc_ast::ast::Mutability;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use syntax::ast::Mutability;
|
||||
|
||||
pub use crate::context::CodegenCx;
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ use rustc::bug;
|
|||
use rustc::session::config::DebugInfo;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
|
||||
use rustc_ast::attr;
|
||||
use rustc_span::symbol::sym;
|
||||
use syntax::attr;
|
||||
|
||||
/// Inserts a side-effect free instruction sequence that makes sure that the
|
||||
/// .debug_gdb_scripts global is referenced, so it isn't removed by the linker.
|
||||
|
|
|
@ -32,6 +32,7 @@ use rustc::ty::subst::{GenericArgKind, SubstsRef};
|
|||
use rustc::ty::Instance;
|
||||
use rustc::ty::{self, AdtKind, ParamEnv, Ty, TyCtxt};
|
||||
use rustc::{bug, span_bug};
|
||||
use rustc_ast::ast;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::const_cstr;
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
|
@ -45,7 +46,6 @@ use rustc_index::vec::{Idx, IndexVec};
|
|||
use rustc_span::symbol::{Interner, Symbol};
|
||||
use rustc_span::{self, FileName, Span};
|
||||
use rustc_target::abi::HasDataLayout;
|
||||
use syntax::ast;
|
||||
|
||||
use libc::{c_longlong, c_uint};
|
||||
use std::collections::hash_map::Entry;
|
||||
|
|
|
@ -35,11 +35,11 @@ use std::cell::RefCell;
|
|||
use std::ffi::CString;
|
||||
|
||||
use rustc::ty::layout::{self, HasTyCtxt, LayoutOf, Size};
|
||||
use rustc_ast::ast;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{self, BytePos, Span};
|
||||
use smallvec::SmallVec;
|
||||
use syntax::ast;
|
||||
|
||||
mod create_scope_map;
|
||||
pub mod gdb;
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::value::Value;
|
|||
use rustc::ty::layout::{self, FnAbiExt, HasTyCtxt, LayoutOf, Primitive};
|
||||
use rustc::ty::{self, Ty};
|
||||
use rustc::{bug, span_bug};
|
||||
use rustc_ast::ast;
|
||||
use rustc_codegen_ssa::base::{compare_simd_types, to_immediate, wants_msvc_seh};
|
||||
use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
|
||||
use rustc_codegen_ssa::glue;
|
||||
|
@ -18,7 +19,6 @@ use rustc_codegen_ssa::mir::place::PlaceRef;
|
|||
use rustc_codegen_ssa::MemFlags;
|
||||
use rustc_hir as hir;
|
||||
use rustc_target::abi::HasDataLayout;
|
||||
use syntax::ast;
|
||||
|
||||
use rustc_codegen_ssa::common::span_invalid_monomorphization_error;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
|
|
|
@ -19,6 +19,7 @@ use rustc_span::symbol::Symbol;
|
|||
|
||||
pub use llvm_util::target_features;
|
||||
use rustc::dep_graph::WorkProduct;
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule};
|
||||
use rustc_codegen_ssa::back::write::{CodegenContext, FatLTOInput, ModuleConfig};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
|
@ -28,7 +29,6 @@ use std::any::Any;
|
|||
use std::ffi::CStr;
|
||||
use std::fs;
|
||||
use std::sync::Arc;
|
||||
use syntax::expand::allocator::AllocatorKind;
|
||||
|
||||
use rustc::dep_graph::DepGraph;
|
||||
use rustc::middle::cstore::{EncodedMetadata, MetadataLoaderDyn};
|
||||
|
|
|
@ -381,10 +381,10 @@ pub enum AsmDialect {
|
|||
}
|
||||
|
||||
impl AsmDialect {
|
||||
pub fn from_generic(asm: syntax::ast::AsmDialect) -> Self {
|
||||
pub fn from_generic(asm: rustc_ast::ast::AsmDialect) -> Self {
|
||||
match asm {
|
||||
syntax::ast::AsmDialect::Att => AsmDialect::Att,
|
||||
syntax::ast::AsmDialect::Intel => AsmDialect::Intel,
|
||||
rustc_ast::ast::AsmDialect::Att => AsmDialect::Att,
|
||||
rustc_ast::ast::AsmDialect::Intel => AsmDialect::Intel,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,10 +12,10 @@ use crate::common;
|
|||
use crate::type_of::LayoutLlvmExt;
|
||||
use rustc::ty::layout::{self, Align, Size, TyLayout};
|
||||
use rustc::ty::Ty;
|
||||
use rustc_ast::ast;
|
||||
use rustc_codegen_ssa::common::TypeKind;
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
|
||||
use syntax::ast;
|
||||
|
||||
use std::fmt;
|
||||
use std::ptr;
|
||||
|
|
|
@ -20,7 +20,7 @@ jobserver = "0.1.11"
|
|||
tempfile = "3.1"
|
||||
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
syntax = { path = "../librustc_ast", package = "rustc_ast" }
|
||||
rustc_ast = { path = "../librustc_ast" }
|
||||
rustc_span = { path = "../librustc_span" }
|
||||
rustc = { path = "../librustc" }
|
||||
rustc_apfloat = { path = "../librustc_apfloat" }
|
||||
|
|
|
@ -8,6 +8,7 @@ use rustc::ty::query::Providers;
|
|||
use rustc::ty::subst::{GenericArgKind, SubstsRef};
|
||||
use rustc::ty::Instance;
|
||||
use rustc::ty::{SymbolName, TyCtxt};
|
||||
use rustc_ast::expand::allocator::ALLOCATOR_METHODS;
|
||||
use rustc_codegen_utils::symbol_names;
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
|
@ -15,7 +16,6 @@ use rustc_hir as hir;
|
|||
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, CRATE_DEF_INDEX, LOCAL_CRATE};
|
||||
use rustc_hir::Node;
|
||||
use rustc_index::vec::IndexVec;
|
||||
use syntax::expand::allocator::ALLOCATOR_METHODS;
|
||||
|
||||
pub fn threshold(tcx: TyCtxt<'_>) -> SymbolExportLevel {
|
||||
crates_export_threshold(&tcx.sess.crate_types.borrow())
|
||||
|
|
|
@ -19,6 +19,7 @@ use rustc::session::config::{
|
|||
};
|
||||
use rustc::session::Session;
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc_ast::attr;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::profiling::SelfProfilerRef;
|
||||
use rustc_data_structures::profiling::TimingGuard;
|
||||
|
@ -37,7 +38,6 @@ use rustc_span::hygiene::ExpnId;
|
|||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_target::spec::MergeFunctions;
|
||||
use syntax::attr;
|
||||
|
||||
use std::any::Any;
|
||||
use std::fs;
|
||||
|
|
|
@ -7,9 +7,9 @@ use rustc::session::{config, Session};
|
|||
use rustc::ty::layout::{HasTyCtxt, LayoutOf, TyLayout};
|
||||
use rustc::ty::Ty;
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
use rustc_codegen_utils::codegen_backend::CodegenBackend;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use syntax::expand::allocator::AllocatorKind;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue