1
Fork 0

Auto merge of #67707 - petrochenkov:crateren, r=Centril

Rename some crates and modules in the frontend

Migrate from `syntax_*` naming scheme to `rustc_*`.
See https://github.com/rust-lang/rust/pull/65324#issuecomment-551103396 and several comments below.

Renamed crates:
`syntax_expand` -> `rustc_expand`
`syntax_pos` -> `rustc_span` ([motivation](https://github.com/rust-lang/rust/pull/65324#issuecomment-552173320))
`syntax_ext` -> `rustc_builtin_macros`

Also one module in resolve is renamed for consistency and to avoid tautology.

r? @Centril
This commit is contained in:
bors 2019-12-30 18:06:54 +00:00
commit a9dd56ff9a
113 changed files with 195 additions and 198 deletions

View file

@ -1099,7 +1099,7 @@ name = "fmt_macros"
version = "0.0.0"
dependencies = [
"rustc_lexer",
"syntax_pos",
"rustc_span",
]
[[package]]
@ -3094,12 +3094,12 @@ dependencies = [
"rustc_index",
"rustc_macros",
"rustc_session",
"rustc_span",
"rustc_target",
"scoped-tls",
"serialize",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
[[package]]
@ -3358,6 +3358,24 @@ dependencies = [
"core",
]
[[package]]
name = "rustc_builtin_macros"
version = "0.0.0"
dependencies = [
"fmt_macros",
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_feature",
"rustc_parse",
"rustc_span",
"rustc_target",
"smallvec 1.0.0",
"syntax",
]
[[package]]
name = "rustc_codegen_llvm"
version = "0.0.0"
@ -3372,17 +3390,17 @@ dependencies = [
"rustc_codegen_utils",
"rustc_data_structures",
"rustc_errors",
"rustc_expand",
"rustc_feature",
"rustc_fs_util",
"rustc_incremental",
"rustc_index",
"rustc_llvm",
"rustc_session",
"rustc_span",
"rustc_target",
"smallvec 0.6.10",
"syntax",
"syntax_expand",
"syntax_pos",
]
[[package]]
@ -3406,10 +3424,10 @@ dependencies = [
"rustc_incremental",
"rustc_index",
"rustc_session",
"rustc_span",
"rustc_target",
"serialize",
"syntax",
"syntax_pos",
"tempfile",
]
@ -3423,9 +3441,9 @@ dependencies = [
"rustc-demangle",
"rustc_data_structures",
"rustc_metadata",
"rustc_span",
"rustc_target",
"syntax",
"syntax_pos",
]
[[package]]
@ -3474,10 +3492,10 @@ dependencies = [
"rustc_plugin_impl",
"rustc_resolve",
"rustc_save_analysis",
"rustc_span",
"rustc_target",
"serialize",
"syntax",
"syntax_pos",
]
[[package]]
@ -3492,20 +3510,36 @@ dependencies = [
"atty",
"log",
"rustc_data_structures",
"rustc_span",
"serialize",
"syntax_pos",
"term_size",
"termcolor",
"unicode-width",
]
[[package]]
name = "rustc_expand"
version = "0.0.0"
dependencies = [
"log",
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_lexer",
"rustc_parse",
"rustc_span",
"serialize",
"smallvec 1.0.0",
"syntax",
]
[[package]]
name = "rustc_feature"
version = "0.0.0"
dependencies = [
"lazy_static 1.3.0",
"rustc_data_structures",
"syntax_pos",
"rustc_span",
]
[[package]]
@ -3523,9 +3557,9 @@ dependencies = [
"rustc_data_structures",
"rustc_fs_util",
"rustc_session",
"rustc_span",
"serialize",
"syntax",
"syntax_pos",
]
[[package]]
@ -3544,11 +3578,13 @@ dependencies = [
"once_cell",
"rustc",
"rustc-rayon",
"rustc_builtin_macros",
"rustc_codegen_llvm",
"rustc_codegen_ssa",
"rustc_codegen_utils",
"rustc_data_structures",
"rustc_errors",
"rustc_expand",
"rustc_incremental",
"rustc_lint",
"rustc_metadata",
@ -3558,15 +3594,13 @@ dependencies = [
"rustc_plugin_impl",
"rustc_privacy",
"rustc_resolve",
"rustc_span",
"rustc_target",
"rustc_traits",
"rustc_typeck",
"serialize",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_ext",
"syntax_pos",
"tempfile",
]
@ -3588,9 +3622,9 @@ dependencies = [
"rustc_feature",
"rustc_index",
"rustc_session",
"rustc_span",
"rustc_target",
"syntax",
"syntax_pos",
]
[[package]]
@ -3635,15 +3669,15 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_index",
"rustc_parse",
"rustc_span",
"rustc_target",
"serialize",
"smallvec 1.0.0",
"stable_deref_trait",
"syntax",
"syntax_expand",
"syntax_pos",
]
[[package]]
@ -3665,11 +3699,11 @@ dependencies = [
"rustc_index",
"rustc_lexer",
"rustc_macros",
"rustc_span",
"rustc_target",
"serialize",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
[[package]]
@ -3694,9 +3728,9 @@ dependencies = [
"rustc_errors",
"rustc_feature",
"rustc_lexer",
"rustc_span",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
"unicode-normalization",
]
@ -3712,9 +3746,9 @@ dependencies = [
"rustc_feature",
"rustc_index",
"rustc_parse",
"rustc_span",
"rustc_target",
"syntax",
"syntax_pos",
]
[[package]]
@ -3724,8 +3758,8 @@ dependencies = [
"rustc",
"rustc_error_codes",
"rustc_metadata",
"rustc_span",
"syntax",
"syntax_pos",
]
[[package]]
@ -3736,9 +3770,9 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_span",
"rustc_typeck",
"syntax",
"syntax_pos",
]
[[package]]
@ -3752,12 +3786,12 @@ dependencies = [
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_feature",
"rustc_metadata",
"rustc_span",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_pos",
]
[[package]]
@ -3771,9 +3805,9 @@ dependencies = [
"rustc_codegen_utils",
"rustc_data_structures",
"rustc_parse",
"rustc_span",
"serde_json",
"syntax",
"syntax_pos",
]
[[package]]
@ -3787,9 +3821,24 @@ dependencies = [
"rustc_feature",
"rustc_fs_util",
"rustc_index",
"rustc_span",
"rustc_target",
"serialize",
"syntax_pos",
]
[[package]]
name = "rustc_span"
version = "0.0.0"
dependencies = [
"arena",
"cfg-if",
"log",
"rustc_data_structures",
"rustc_index",
"rustc_macros",
"scoped-tls",
"serialize",
"unicode-width",
]
[[package]]
@ -3801,8 +3850,8 @@ dependencies = [
"rustc_data_structures",
"rustc_index",
"rustc_macros",
"rustc_span",
"serialize",
"syntax_pos",
]
[[package]]
@ -3824,10 +3873,10 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_macros",
"rustc_span",
"rustc_target",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
[[package]]
@ -3852,10 +3901,10 @@ dependencies = [
"rustc_error_codes",
"rustc_errors",
"rustc_index",
"rustc_span",
"rustc_target",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
[[package]]
@ -4369,59 +4418,10 @@ dependencies = [
"rustc_lexer",
"rustc_macros",
"rustc_session",
"rustc_span",
"scoped-tls",
"serialize",
"smallvec 1.0.0",
"syntax_pos",
]
[[package]]
name = "syntax_expand"
version = "0.0.0"
dependencies = [
"log",
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_lexer",
"rustc_parse",
"serialize",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
[[package]]
name = "syntax_ext"
version = "0.0.0"
dependencies = [
"fmt_macros",
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_parse",
"rustc_target",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_pos",
]
[[package]]
name = "syntax_pos"
version = "0.0.0"
dependencies = [
"arena",
"cfg-if",
"log",
"rustc_data_structures",
"rustc_index",
"rustc_macros",
"scoped-tls",
"serialize",
"unicode-width",
]
[[package]]

View file

@ -9,5 +9,5 @@ name = "fmt_macros"
path = "lib.rs"
[dependencies]
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_lexer = { path = "../librustc_lexer" }

View file

@ -30,7 +30,7 @@ rustc_index = { path = "../librustc_index" }
errors = { path = "../librustc_errors", package = "rustc_errors" }
rustc_serialize = { path = "../libserialize", package = "serialize" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
backtrace = "0.3.40"
parking_lot = "0.9"
byteorder = { version = "1.3" }

View file

@ -1,11 +1,11 @@
[package]
authors = ["The Rust Project Developers"]
name = "syntax_ext"
name = "rustc_builtin_macros"
version = "0.0.0"
edition = "2018"
[lib]
name = "syntax_ext"
name = "rustc_builtin_macros"
path = "lib.rs"
doctest = false
@ -19,6 +19,6 @@ rustc_parse = { path = "../librustc_parse" }
rustc_target = { path = "../librustc_target" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
syntax_expand = { path = "../libsyntax_expand" }
syntax_pos = { path = "../libsyntax_pos" }
rustc_expand = { path = "../librustc_expand" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_error_codes = { path = "../librustc_error_codes" }

View file

@ -3,6 +3,7 @@
use State::*;
use errors::{DiagnosticBuilder, PResult};
use rustc_expand::base::*;
use rustc_parse::parser::Parser;
use syntax::ast::{self, AsmDialect};
use syntax::ptr::P;
@ -10,7 +11,6 @@ use syntax::symbol::{kw, sym, Symbol};
use syntax::token::{self, Token};
use syntax::tokenstream::{self, TokenStream};
use syntax::{span_err, struct_span_err};
use syntax_expand::base::*;
use syntax_pos::Span;
use rustc_error_codes::*;

View file

@ -1,5 +1,6 @@
use errors::{Applicability, DiagnosticBuilder};
use rustc_expand::base::*;
use rustc_parse::parser::Parser;
use syntax::ast::{self, *};
use syntax::print::pprust;
@ -7,7 +8,6 @@ use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
use syntax::token::{self, TokenKind};
use syntax::tokenstream::{DelimSpan, TokenStream, TokenTree};
use syntax_expand::base::*;
use syntax_pos::{Span, DUMMY_SP};
pub fn expand_assert<'cx>(

View file

@ -3,11 +3,11 @@
/// current compilation environment.
use errors::DiagnosticBuilder;
use rustc_expand::base::{self, *};
use syntax::ast;
use syntax::attr;
use syntax::token;
use syntax::tokenstream::TokenStream;
use syntax_expand::base::{self, *};
use syntax_pos::Span;
pub fn expand_cfg(

View file

@ -1,10 +1,10 @@
//! Attributes injected into the crate root from command line using `-Z crate-attr`.
use rustc_expand::panictry;
use syntax::ast::{self, AttrItem, AttrStyle};
use syntax::attr::mk_attr;
use syntax::sess::ParseSess;
use syntax::token;
use syntax_expand::panictry;
use syntax_pos::FileName;
pub fn inject(mut krate: ast::Crate, parse_sess: &ParseSess, attrs: &[String]) -> ast::Crate {

View file

@ -1,7 +1,7 @@
// The compiler code necessary to support the compile_error! extension.
use rustc_expand::base::{self, *};
use syntax::tokenstream::TokenStream;
use syntax_expand::base::{self, *};
use syntax_pos::Span;
pub fn expand_compile_error<'cx>(

View file

@ -1,7 +1,7 @@
use rustc_expand::base::{self, DummyResult};
use syntax::ast;
use syntax::symbol::Symbol;
use syntax::tokenstream::TokenStream;
use syntax_expand::base::{self, DummyResult};
use std::string::String;

View file

@ -1,8 +1,8 @@
use rustc_expand::base::{self, *};
use syntax::ast;
use syntax::ptr::P;
use syntax::token::{self, Token};
use syntax::tokenstream::{TokenStream, TokenTree};
use syntax_expand::base::{self, *};
use syntax_pos::symbol::Symbol;
use syntax_pos::Span;

View file

@ -2,8 +2,8 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::MetaItem;
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_copy(

View file

@ -2,10 +2,10 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{self, Expr, GenericArg, Generics, ItemKind, MetaItem, VariantData};
use syntax::ptr::P;
use syntax::symbol::{kw, sym, Symbol};
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_clone(

View file

@ -2,10 +2,10 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{self, Expr, GenericArg, Ident, MetaItem};
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_eq(

View file

@ -2,10 +2,10 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{self, Expr, MetaItem};
use syntax::ptr::P;
use syntax::symbol::sym;
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_ord(

View file

@ -2,10 +2,10 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::{path_local, path_std};
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{BinOpKind, Expr, MetaItem};
use syntax::ptr::P;
use syntax::symbol::sym;
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_partial_eq(

View file

@ -4,10 +4,10 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::{path_local, path_std, pathvec_std};
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{self, BinOpKind, Expr, MetaItem};
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_partial_ord(

View file

@ -2,11 +2,11 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{self, Ident};
use syntax::ast::{Expr, MetaItem};
use syntax::ptr::P;
use syntax::symbol::sym;
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::{Span, DUMMY_SP};
pub fn expand_deriving_debug(

View file

@ -4,11 +4,11 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::pathvec_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast;
use syntax::ast::{Expr, MetaItem, Mutability};
use syntax::ptr::P;
use syntax::symbol::Symbol;
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_rustc_decodable(

View file

@ -2,11 +2,11 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::path_std;
use rustc_expand::base::{Annotatable, DummyResult, ExtCtxt};
use syntax::ast::{Expr, MetaItem};
use syntax::ptr::P;
use syntax::span_err;
use syntax::symbol::{kw, sym};
use syntax_expand::base::{Annotatable, DummyResult, ExtCtxt};
use syntax_pos::Span;
use rustc_error_codes::*;

View file

@ -89,10 +89,10 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::pathvec_std;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{Expr, ExprKind, MetaItem, Mutability};
use syntax::ptr::P;
use syntax::symbol::Symbol;
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_rustc_encodable(

View file

@ -181,6 +181,7 @@ use std::cell::RefCell;
use std::iter;
use std::vec;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{self, BinOpKind, EnumDef, Expr, Generics, Ident, PatKind};
use syntax::ast::{GenericArg, GenericParamKind, VariantData};
use syntax::attr;
@ -189,7 +190,6 @@ use syntax::sess::ParseSess;
use syntax::source_map::respan;
use syntax::symbol::{kw, sym, Symbol};
use syntax::util::map_in_place::MapInPlace;
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
use ty::{LifetimeBounds, Path, Ptr, PtrTy, Self_, Ty};
@ -412,8 +412,8 @@ impl<'a> TraitDef<'a> {
_ => {
// Non-ADT derive is an error, but it should have been
// set earlier; see
// libsyntax_expand/expand.rs:MacroExpander::fully_expand_fragment()
// libsyntax_expand/base.rs:Annotatable::derive_allowed()
// librustc_expand/expand.rs:MacroExpander::fully_expand_fragment()
// librustc_expand/base.rs:Annotatable::derive_allowed()
return;
}
};
@ -487,8 +487,8 @@ impl<'a> TraitDef<'a> {
_ => {
// Non-Item derive is an error, but it should have been
// set earlier; see
// libsyntax_expand/expand.rs:MacroExpander::fully_expand_fragment()
// libsyntax_expand/base.rs:Annotatable::derive_allowed()
// librustc_expand/expand.rs:MacroExpander::fully_expand_fragment()
// librustc_expand/base.rs:Annotatable::derive_allowed()
return;
}
}

View file

@ -4,10 +4,10 @@
pub use PtrTy::*;
pub use Ty::*;
use rustc_expand::base::ExtCtxt;
use syntax::ast::{self, Expr, GenericArg, GenericParamKind, Generics, Ident, SelfKind};
use syntax::ptr::P;
use syntax::source_map::{respan, DUMMY_SP};
use syntax_expand::base::ExtCtxt;
use syntax_pos::symbol::kw;
use syntax_pos::Span;

View file

@ -2,10 +2,10 @@ use crate::deriving::generic::ty::*;
use crate::deriving::generic::*;
use crate::deriving::{self, path_std, pathvec_std};
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{Expr, MetaItem, Mutability};
use syntax::ptr::P;
use syntax::symbol::sym;
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand_deriving_hash(

View file

@ -1,9 +1,9 @@
//! The compiler code necessary to implement the `#[derive]` extensions.
use rustc_expand::base::{Annotatable, ExtCtxt, MultiItemModifier};
use syntax::ast::{self, ItemKind, MetaItem};
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
use syntax_expand::base::{Annotatable, ExtCtxt, MultiItemModifier};
use syntax_pos::Span;
macro path_local($x:ident) {
@ -92,8 +92,8 @@ fn inject_impl_of_structural_trait(
_ => {
// Non-Item derive is an error, but it should have been
// set earlier; see
// libsyntax_expand/expand.rs:MacroExpander::fully_expand_fragment()
// libsyntax_expand/base.rs:Annotatable::derive_allowed()
// librustc_expand/expand.rs:MacroExpander::fully_expand_fragment()
// librustc_expand/base.rs:Annotatable::derive_allowed()
return;
}
};

View file

@ -3,10 +3,10 @@
// interface.
//
use rustc_expand::base::{self, *};
use syntax::ast::{self, GenericArg, Ident};
use syntax::symbol::{kw, sym, Symbol};
use syntax::tokenstream::TokenStream;
use syntax_expand::base::{self, *};
use syntax_pos::Span;
use std::env;

View file

@ -7,12 +7,12 @@ use errors::pluralize;
use errors::Applicability;
use errors::DiagnosticBuilder;
use rustc_expand::base::{self, *};
use syntax::ast;
use syntax::ptr::P;
use syntax::symbol::{sym, Symbol};
use syntax::token;
use syntax::tokenstream::TokenStream;
use syntax_expand::base::{self, *};
use syntax_pos::{MultiSpan, Span};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};

View file

@ -1,11 +1,11 @@
use crate::util::check_builtin_macro_attribute;
use rustc_expand::base::{Annotatable, ExtCtxt};
use syntax::ast::{self, Attribute, Expr, FnHeader, FnSig, Generics, Ident, Param};
use syntax::ast::{ItemKind, Mutability, Stmt, Ty, TyKind, Unsafety};
use syntax::expand::allocator::{AllocatorKind, AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS};
use syntax::ptr::P;
use syntax::symbol::{kw, sym, Symbol};
use syntax_expand::base::{Annotatable, ExtCtxt};
use syntax_pos::Span;
pub fn expand(

View file

@ -9,13 +9,13 @@
/// therefore apply.
use errors::DiagnosticBuilder;
use rustc_expand::base::{self, *};
use smallvec::smallvec;
use syntax::ast;
use syntax::ptr::P;
use syntax::source_map::respan;
use syntax::token;
use syntax::tokenstream::TokenStream;
use syntax_expand::base::{self, *};
use syntax_pos::Span;
pub fn expand_global_asm<'cx>(

View file

@ -13,11 +13,11 @@ extern crate proc_macro;
use crate::deriving::*;
use rustc_expand::base::{MacroExpanderFn, Resolver, SyntaxExtension, SyntaxExtensionKind};
use rustc_expand::proc_macro::BangProcMacro;
use syntax::ast::Ident;
use syntax::edition::Edition;
use syntax::symbol::sym;
use syntax_expand::base::{MacroExpanderFn, Resolver, SyntaxExtension, SyntaxExtensionKind};
use syntax_expand::proc_macro::BangProcMacro;
mod asm;
mod assert;

View file

@ -1,6 +1,6 @@
use rustc_expand::base;
use syntax::print;
use syntax::tokenstream::TokenStream;
use syntax_expand::base;
use syntax_pos;
pub fn expand_log_syntax<'cx>(

View file

@ -1,5 +1,7 @@
use std::mem;
use rustc_expand::base::{ExtCtxt, Resolver};
use rustc_expand::expand::{AstFragment, ExpansionConfig};
use smallvec::smallvec;
use syntax::ast::{self, Ident};
use syntax::attr;
@ -9,8 +11,6 @@ use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym};
use syntax::visit::{self, Visitor};
use syntax_expand::base::{ExtCtxt, Resolver};
use syntax_expand::expand::{AstFragment, ExpansionConfig};
use syntax_pos::hygiene::AstPass;
use syntax_pos::{Span, DUMMY_SP};

View file

@ -1,3 +1,5 @@
use rustc_expand::base::{self, *};
use rustc_expand::panictry;
use rustc_parse::{self, new_sub_parser_from_file, parser::Parser, DirectoryOwnership};
use syntax::ast;
use syntax::early_buffered_lints::INCOMPLETE_INCLUDE;
@ -6,8 +8,6 @@ use syntax::ptr::P;
use syntax::symbol::Symbol;
use syntax::token;
use syntax::tokenstream::TokenStream;
use syntax_expand::base::{self, *};
use syntax_expand::panictry;
use smallvec::SmallVec;
use syntax_pos::{self, Pos, Span};

View file

@ -1,10 +1,10 @@
use rustc_expand::base::{ExtCtxt, Resolver};
use rustc_expand::expand::ExpansionConfig;
use syntax::edition::Edition;
use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::symbol::{kw, sym, Ident, Symbol};
use syntax::{ast, attr};
use syntax_expand::base::{ExtCtxt, Resolver};
use syntax_expand::expand::ExpansionConfig;
use syntax_pos::hygiene::AstPass;
use syntax_pos::DUMMY_SP;

View file

@ -2,12 +2,12 @@
/// 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_expand::base::*;
use syntax::ast;
use syntax::attr;
use syntax::print::pprust;
use syntax::source_map::respan;
use syntax::symbol::{sym, Symbol};
use syntax_expand::base::*;
use syntax_pos::Span;
use std::iter;

View file

@ -1,6 +1,8 @@
// Code that generates a test runner to run all the tests in a crate
use log::debug;
use rustc_expand::base::{ExtCtxt, Resolver};
use rustc_expand::expand::{AstFragment, ExpansionConfig};
use rustc_feature::Features;
use rustc_target::spec::PanicStrategy;
use smallvec::{smallvec, SmallVec};
@ -12,8 +14,6 @@ use syntax::ptr::P;
use syntax::sess::ParseSess;
use syntax::source_map::respan;
use syntax::symbol::{sym, Symbol};
use syntax_expand::base::{ExtCtxt, Resolver};
use syntax_expand::expand::{AstFragment, ExpansionConfig};
use syntax_pos::hygiene::{AstPass, SyntaxContext, Transparency};
use syntax_pos::{Span, DUMMY_SP};

View file

@ -1,6 +1,6 @@
use rustc_expand::base::{self, ExtCtxt};
use syntax::symbol::kw;
use syntax::tokenstream::{TokenStream, TokenTree};
use syntax_expand::base::{self, ExtCtxt};
use syntax_pos::Span;
pub fn expand_trace_macros(

View file

@ -1,7 +1,7 @@
use rustc_expand::base::ExtCtxt;
use rustc_feature::AttributeTemplate;
use rustc_parse::validate_attr;
use syntax::ast::MetaItem;
use syntax_expand::base::ExtCtxt;
use syntax_pos::Symbol;
pub fn check_builtin_macro_attribute(ecx: &ExtCtxt<'_>, meta_item: &MetaItem, name: Symbol) {

View file

@ -30,5 +30,5 @@ rustc_session = { path = "../librustc_session" }
rustc_target = { path = "../librustc_target" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
syntax_expand = { path = "../libsyntax_expand" }
syntax_pos = { path = "../libsyntax_pos" }
rustc_expand = { path = "../librustc_expand" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }

View file

@ -21,7 +21,7 @@ tempfile = "3.1"
rustc_serialize = { path = "../libserialize", package = "serialize" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc = { path = "../librustc" }
rustc_apfloat = { path = "../librustc_apfloat" }
rustc_codegen_utils = { path = "../librustc_codegen_utils" }

View file

@ -15,7 +15,7 @@ punycode = "0.4.0"
rustc-demangle = "0.1.16"
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc = { path = "../librustc" }
rustc_target = { path = "../librustc_target" }
rustc_data_structures = { path = "../librustc_data_structures" }

View file

@ -31,7 +31,7 @@ rustc_interface = { path = "../librustc_interface" }
rustc_serialize = { path = "../libserialize", package = "serialize" }
rustc_resolve = { path = "../librustc_resolve" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
[features]
llvm = ['rustc_interface/llvm']

View file

@ -12,7 +12,7 @@ doctest = false
[dependencies]
log = "0.4"
rustc_serialize = { path = "../libserialize", package = "serialize" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_data_structures = { path = "../librustc_data_structures" }
unicode-width = "0.1.4"
atty = "0.2"

View file

@ -1,19 +1,19 @@
[package]
authors = ["The Rust Project Developers"]
name = "syntax_expand"
name = "rustc_expand"
version = "0.0.0"
edition = "2018"
build = false
[lib]
name = "syntax_expand"
name = "rustc_expand"
path = "lib.rs"
doctest = false
[dependencies]
rustc_serialize = { path = "../libserialize", package = "serialize" }
log = "0.4"
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
errors = { path = "../librustc_errors", package = "rustc_errors" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_feature = { path = "../librustc_feature" }

View file

@ -12,4 +12,4 @@ doctest = false
[dependencies]
rustc_data_structures = { path = "../librustc_data_structures" }
lazy_static = "1.0.0"
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }

View file

@ -17,6 +17,6 @@ rustc = { path = "../librustc" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_serialize = { path = "../libserialize", package = "serialize" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_fs_util = { path = "../librustc_fs_util" }
rustc_session = { path = "../librustc_session" }

View file

@ -14,10 +14,10 @@ log = "0.4"
rayon = { version = "0.3.0", package = "rustc-rayon" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
syntax_ext = { path = "../libsyntax_ext" }
syntax_expand = { path = "../libsyntax_expand" }
rustc_builtin_macros = { path = "../librustc_builtin_macros" }
rustc_expand = { path = "../librustc_expand" }
rustc_parse = { path = "../librustc_parse" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_serialize = { path = "../libserialize", package = "serialize" }
rustc = { path = "../librustc" }
rustc_incremental = { path = "../librustc_incremental" }

View file

@ -19,12 +19,14 @@ use rustc::traits;
use rustc::ty::steal::Steal;
use rustc::ty::{self, AllArenas, GlobalCtxt, ResolverOutputs, TyCtxt};
use rustc::util::common::{time, ErrorReported};
use rustc_builtin_macros;
use rustc_codegen_ssa::back::link::emit_metadata;
use rustc_codegen_utils::codegen_backend::CodegenBackend;
use rustc_codegen_utils::link::filename_for_metadata;
use rustc_data_structures::sync::{par_iter, Lrc, Once, ParallelIterator, WorkerLocal};
use rustc_data_structures::{box_region_allow_access, declare_box_region_type, parallel};
use rustc_errors::PResult;
use rustc_expand::base::ExtCtxt;
use rustc_incremental;
use rustc_mir as mir;
use rustc_parse::{parse_crate_from_file, parse_crate_from_source_str};
@ -39,8 +41,6 @@ use syntax::mut_visit::MutVisitor;
use syntax::symbol::Symbol;
use syntax::util::node_count::NodeCounter;
use syntax::{self, ast, visit};
use syntax_expand::base::ExtCtxt;
use syntax_ext;
use syntax_pos::FileName;
use rustc_serialize::json;
@ -164,14 +164,14 @@ pub fn register_plugins<'a>(
crate_name: &str,
) -> Result<(ast::Crate, Lrc<lint::LintStore>)> {
krate = time(sess, "attributes injection", || {
syntax_ext::cmdline_attrs::inject(
rustc_builtin_macros::cmdline_attrs::inject(
krate,
&sess.parse_sess,
&sess.opts.debugging_opts.crate_attr,
)
});
let (krate, features) = syntax_expand::config::features(
let (krate, features) = rustc_expand::config::features(
krate,
&sess.parse_sess,
sess.edition(),
@ -243,11 +243,11 @@ fn configure_and_expand_inner<'a>(
});
let mut resolver = Resolver::new(sess, &krate, crate_name, metadata_loader, &resolver_arenas);
syntax_ext::register_builtin_macros(&mut resolver, sess.edition());
rustc_builtin_macros::register_builtin_macros(&mut resolver, sess.edition());
krate = time(sess, "crate injection", || {
let alt_std_name = sess.opts.alt_std_name.as_ref().map(|s| Symbol::intern(s));
let (krate, name) = syntax_ext::standard_library_imports::inject(
let (krate, name) = rustc_builtin_macros::standard_library_imports::inject(
krate,
&mut resolver,
&sess.parse_sess,
@ -297,12 +297,12 @@ fn configure_and_expand_inner<'a>(
// Create the config for macro expansion
let features = sess.features_untracked();
let cfg = syntax_expand::expand::ExpansionConfig {
let cfg = rustc_expand::expand::ExpansionConfig {
features: Some(&features),
recursion_limit: *sess.recursion_limit.get(),
trace_mac: sess.opts.debugging_opts.trace_macros,
should_test: sess.opts.test,
..syntax_expand::expand::ExpansionConfig::default(crate_name.to_string())
..rustc_expand::expand::ExpansionConfig::default(crate_name.to_string())
};
let mut ecx = ExtCtxt::new(&sess.parse_sess, cfg, &mut resolver);
@ -332,7 +332,7 @@ fn configure_and_expand_inner<'a>(
});
time(sess, "maybe building test harness", || {
syntax_ext::test_harness::inject(
rustc_builtin_macros::test_harness::inject(
&sess.parse_sess,
&mut resolver,
sess.opts.test,
@ -380,7 +380,7 @@ fn configure_and_expand_inner<'a>(
krate = time(sess, "maybe creating a macro crate", || {
let num_crate_types = crate_types.len();
let is_test_crate = sess.opts.test;
syntax_ext::proc_macro_harness::inject(
rustc_builtin_macros::proc_macro_harness::inject(
&sess.parse_sess,
&mut resolver,
krate,

View file

@ -13,7 +13,7 @@ log = "0.4"
rustc = { path = "../librustc" }
rustc_target = { path = "../librustc_target" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_feature = { path = "../librustc_feature" }
rustc_index = { path = "../librustc_index" }

View file

@ -22,7 +22,7 @@ rustc_index = { path = "../librustc_index" }
rustc_serialize = { path = "../libserialize", package = "serialize" }
stable_deref_trait = "1.0.0"
syntax = { path = "../libsyntax" }
syntax_expand = { path = "../libsyntax_expand" }
rustc_expand = { path = "../librustc_expand" }
rustc_parse = { path = "../librustc_parse" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_error_codes = { path = "../librustc_error_codes" }

View file

@ -22,13 +22,13 @@ use std::{cmp, fs};
use log::{debug, info, log_enabled};
use proc_macro::bridge::client::ProcMacro;
use rustc_expand::base::SyntaxExtension;
use syntax::ast;
use syntax::attr;
use syntax::edition::Edition;
use syntax::expand::allocator::{global_allocator_spans, AllocatorKind};
use syntax::span_fatal;
use syntax::symbol::{sym, Symbol};
use syntax_expand::base::SyntaxExtension;
use syntax_pos::{Span, DUMMY_SP};
use rustc_error_codes::*;

View file

@ -33,12 +33,12 @@ use std::u32;
use log::debug;
use proc_macro::bridge::client::ProcMacro;
use rustc_expand::base::{SyntaxExtension, SyntaxExtensionKind};
use rustc_expand::proc_macro::{AttrProcMacro, BangProcMacro, ProcMacroDerive};
use rustc_serialize::{opaque, Decodable, Decoder, SpecializedDecoder};
use syntax::ast::{self, Ident};
use syntax::attr;
use syntax::source_map::{self, respan, Spanned};
use syntax_expand::base::{SyntaxExtension, SyntaxExtensionKind};
use syntax_expand::proc_macro::{AttrProcMacro, BangProcMacro, ProcMacroDerive};
use syntax_pos::symbol::{sym, Symbol};
use syntax_pos::{self, hygiene::MacroKind, BytePos, Pos, Span, DUMMY_SP};
@ -637,7 +637,7 @@ impl<'a, 'tcx> CrateMetadata {
// DefIndex's in root.proc_macro_data have a one-to-one correspondence
// with items in 'raw_proc_macros'.
// NOTE: If you update the order of macros in 'proc_macro_data' for any reason,
// you must also update src/libsyntax_ext/proc_macro_harness.rs
// you must also update src/librustc_builtin_macros/proc_macro_harness.rs
// Failing to do so will result in incorrect data being associated
// with proc macros when deserialized.
let pos = self.root.proc_macro_data.unwrap().decode(self).position(|i| i == id).unwrap();

View file

@ -26,7 +26,7 @@ rustc_lexer = { path = "../librustc_lexer" }
rustc_macros = { path = "../librustc_macros" }
rustc_serialize = { path = "../libserialize", package = "serialize" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_apfloat = { path = "../librustc_apfloat" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc_error_codes = { path = "../librustc_error_codes" }

View file

@ -18,6 +18,6 @@ rustc_lexer = { path = "../librustc_lexer" }
rustc_errors = { path = "../librustc_errors" }
rustc_error_codes = { path = "../librustc_error_codes" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
syntax = { path = "../libsyntax" }
unicode-normalization = "0.1.11"

View file

@ -1,7 +1,7 @@
//! Process the potential `cfg` attributes on a module.
//! Also determine if the module should be included in this configuration.
//!
//! This module properly belongs in syntax_expand, but for now it's tied into
//! This module properly belongs in rustc_expand, but for now it's tied into
//! parsing, so we leave it here to avoid complicated out-of-line dependencies.
//!
//! A principled solution to this wrong location would be to implement [#64197].

View file

@ -17,6 +17,6 @@ rustc_index = { path = "../librustc_index" }
rustc_parse = { path = "../librustc_parse" }
rustc_target = { path = "../librustc_target" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
errors = { path = "../librustc_errors", package = "rustc_errors" }
rustc_error_codes = { path = "../librustc_error_codes" }

View file

@ -14,5 +14,5 @@ doctest = false
rustc = { path = "../librustc" }
rustc_metadata = { path = "../librustc_metadata" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_error_codes = { path = "../librustc_error_codes" }

View file

@ -12,7 +12,7 @@ path = "lib.rs"
rustc = { path = "../librustc" }
rustc_typeck = { path = "../librustc_typeck" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_error_codes = { path = "../librustc_error_codes" }
log = "0.4"

View file

@ -14,11 +14,11 @@ doctest = false
bitflags = "1.2.1"
log = "0.4"
syntax = { path = "../libsyntax" }
syntax_expand = { path = "../libsyntax_expand" }
rustc_expand = { path = "../librustc_expand" }
rustc = { path = "../librustc" }
arena = { path = "../libarena" }
errors = { path = "../librustc_errors", package = "rustc_errors" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_feature = { path = "../librustc_feature" }
rustc_metadata = { path = "../librustc_metadata" }

View file

@ -6,9 +6,9 @@
//! Imports are also considered items and placed into modules here, but not resolved yet.
use crate::def_collector::collect_definitions;
use crate::imports::ImportDirective;
use crate::imports::ImportDirectiveSubclass::{self, GlobImport, SingleImport};
use crate::macros::{LegacyBinding, LegacyScope};
use crate::resolve_imports::ImportDirective;
use crate::resolve_imports::ImportDirectiveSubclass::{self, GlobImport, SingleImport};
use crate::Namespace::{self, MacroNS, TypeNS, ValueNS};
use crate::{CrateLint, Determinacy, PathResult, ResolutionError, VisResolutionError};
use crate::{
@ -29,6 +29,8 @@ use std::ptr;
use errors::Applicability;
use rustc_expand::base::SyntaxExtension;
use rustc_expand::expand::AstFragment;
use syntax::ast::{self, Block, ForeignItem, ForeignItemKind, Item, ItemKind, NodeId};
use syntax::ast::{AssocItem, AssocItemKind, MetaItemKind, StmtKind};
use syntax::ast::{Ident, Name};
@ -38,8 +40,6 @@ use syntax::span_err;
use syntax::symbol::{kw, sym};
use syntax::token::{self, Token};
use syntax::visit::{self, Visitor};
use syntax_expand::base::SyntaxExtension;
use syntax_expand::expand::AstFragment;
use syntax_pos::hygiene::{ExpnId, MacroKind};
use syntax_pos::{Span, DUMMY_SP};

View file

@ -23,7 +23,7 @@
// - `check_crate` finally emits the diagnostics based on the data generated
// in the last step
use crate::resolve_imports::ImportDirectiveSubclass;
use crate::imports::ImportDirectiveSubclass;
use crate::Resolver;
use errors::pluralize;

View file

@ -1,11 +1,11 @@
use log::debug;
use rustc::hir::def_id::DefIndex;
use rustc::hir::map::definitions::*;
use rustc_expand::expand::AstFragment;
use syntax::ast::*;
use syntax::symbol::{kw, sym};
use syntax::token::{self, Token};
use syntax::visit;
use syntax_expand::expand::AstFragment;
use syntax_pos::hygiene::ExpnId;
use syntax_pos::Span;

View file

@ -19,8 +19,8 @@ use syntax::util::lev_distance::find_best_match_for_name;
use syntax_pos::hygiene::MacroKind;
use syntax_pos::{BytePos, MultiSpan, Span};
use crate::imports::{ImportDirective, ImportDirectiveSubclass, ImportResolver};
use crate::path_names_to_string;
use crate::resolve_imports::{ImportDirective, ImportDirectiveSubclass, ImportResolver};
use crate::VisResolutionError;
use crate::{BindingError, CrateLint, HasGenericParams, LegacyScope, Module, ModuleOrUniformRoot};
use crate::{ParentScope, PathResult, ResolutionError, Resolver, Scope, ScopeSet, Segment};

View file

@ -3,7 +3,7 @@
//! So it just walks through the crate and resolves all the expressions, types, etc.
//!
//! If you wonder why there's no `early.rs`, that's because it's split into three files -
//! `build_reduced_graph.rs`, `macros.rs` and `resolve_imports.rs`.
//! `build_reduced_graph.rs`, `macros.rs` and `imports.rs`.
use RibKind::*;

View file

@ -36,6 +36,7 @@ use rustc::util::nodemap::{DefIdMap, FxHashMap, FxHashSet, NodeMap, NodeSet};
use rustc_metadata::creader::{CStore, CrateLoader};
use errors::{Applicability, DiagnosticBuilder};
use rustc_expand::base::SyntaxExtension;
use syntax::ast::{self, FloatTy, Ident, IntTy, Name, NodeId, UintTy};
use syntax::ast::{Crate, CRATE_NODE_ID};
use syntax::ast::{ItemKind, Path};
@ -45,7 +46,6 @@ use syntax::source_map::Spanned;
use syntax::symbol::{kw, sym};
use syntax::visit::{self, Visitor};
use syntax::{struct_span_err, unwrap_or};
use syntax_expand::base::SyntaxExtension;
use syntax_pos::hygiene::{ExpnId, ExpnKind, MacroKind, SyntaxContext, Transparency};
use syntax_pos::{Span, DUMMY_SP};
@ -60,9 +60,9 @@ use std::{cmp, fmt, iter, ptr};
use diagnostics::{extend_span_to_previous_binding, find_span_of_binding_until_next_binding};
use diagnostics::{ImportSuggestion, Suggestion};
use imports::{ImportDirective, ImportDirectiveSubclass, ImportResolver, NameResolution};
use late::{HasGenericParams, PathSource, Rib, RibKind::*};
use macros::{LegacyBinding, LegacyScope};
use resolve_imports::{ImportDirective, ImportDirectiveSubclass, ImportResolver, NameResolution};
use rustc_error_codes::*;
@ -72,9 +72,9 @@ mod build_reduced_graph;
mod check_unused;
mod def_collector;
mod diagnostics;
mod imports;
mod late;
mod macros;
mod resolve_imports;
enum Weak {
Yes,

View file

@ -1,7 +1,7 @@
//! A bunch of methods and structures more or less related to resolving macros and
//! interface provided by `Resolver` to macro expander.
use crate::resolve_imports::ImportResolver;
use crate::imports::ImportResolver;
use crate::Namespace::*;
use crate::{AmbiguityError, AmbiguityErrorMisc, AmbiguityKind, Determinacy};
use crate::{CrateLint, ParentScope, ResolutionError, Resolver, Scope, ScopeSet, Weak};
@ -12,16 +12,16 @@ use rustc::middle::stability;
use rustc::session::Session;
use rustc::util::nodemap::FxHashSet;
use rustc::{lint, span_bug, ty};
use rustc_expand::base::SyntaxExtension;
use rustc_expand::base::{self, Indeterminate, InvocationRes};
use rustc_expand::compile_declarative_macro;
use rustc_expand::expand::{AstFragment, AstFragmentKind, Invocation, InvocationKind};
use rustc_feature::is_builtin_attr_name;
use syntax::ast::{self, Ident, NodeId};
use syntax::attr::{self, StabilityLevel};
use syntax::edition::Edition;
use syntax::feature_gate::feature_err;
use syntax::print::pprust;
use syntax_expand::base::SyntaxExtension;
use syntax_expand::base::{self, Indeterminate, InvocationRes};
use syntax_expand::compile_declarative_macro;
use syntax_expand::expand::{AstFragment, AstFragmentKind, Invocation, InvocationKind};
use syntax_pos::hygiene::{self, ExpnData, ExpnId, ExpnKind};
use syntax_pos::symbol::{kw, sym, Symbol};
use syntax_pos::{Span, DUMMY_SP};

View file

@ -16,6 +16,6 @@ rustc_codegen_utils = { path = "../librustc_codegen_utils" }
rustc_parse = { path = "../librustc_parse" }
serde_json = "1"
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rls-data = "0.19"
rls-span = "0.5"

View file

@ -15,7 +15,7 @@ rustc_feature = { path = "../librustc_feature" }
rustc_target = { path = "../librustc_target" }
rustc_serialize = { path = "../libserialize", package = "serialize" }
rustc_data_structures = { path = "../librustc_data_structures" }
syntax_pos = { path = "../libsyntax_pos" }
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
rustc_index = { path = "../librustc_index" }
rustc_fs_util = { path = "../librustc_fs_util" }
num_cpus = "1.0"

View file

@ -1,11 +1,11 @@
[package]
authors = ["The Rust Project Developers"]
name = "syntax_pos"
name = "rustc_span"
version = "0.0.0"
edition = "2018"
[lib]
name = "syntax_pos"
name = "rustc_span"
path = "lib.rs"
doctest = false

Some files were not shown because too many files have changed in this diff Show more