Skip to content

Commit a9dd56f

Browse files
committed
Auto merge of #67707 - petrochenkov:crateren, r=Centril
Rename some crates and modules in the frontend Migrate from `syntax_*` naming scheme to `rustc_*`. See #65324 (comment) and several comments below. Renamed crates: `syntax_expand` -> `rustc_expand` `syntax_pos` -> `rustc_span` ([motivation](#65324 (comment))) `syntax_ext` -> `rustc_builtin_macros` Also one module in resolve is renamed for consistency and to avoid tautology. r? @Centril
2 parents 9d6f871 + 7608f21 commit a9dd56f

File tree

113 files changed

+195
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+195
-198
lines changed

Cargo.lock

Lines changed: 78 additions & 78 deletions
Large diffs are not rendered by default.

src/libfmt_macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ name = "fmt_macros"
99
path = "lib.rs"
1010

1111
[dependencies]
12-
syntax_pos = { path = "../libsyntax_pos" }
12+
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
1313
rustc_lexer = { path = "../librustc_lexer" }

src/librustc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ rustc_index = { path = "../librustc_index" }
3030
errors = { path = "../librustc_errors", package = "rustc_errors" }
3131
rustc_serialize = { path = "../libserialize", package = "serialize" }
3232
syntax = { path = "../libsyntax" }
33-
syntax_pos = { path = "../libsyntax_pos" }
33+
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
3434
backtrace = "0.3.40"
3535
parking_lot = "0.9"
3636
byteorder = { version = "1.3" }

src/libsyntax_ext/Cargo.toml renamed to src/librustc_builtin_macros/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
authors = ["The Rust Project Developers"]
3-
name = "syntax_ext"
3+
name = "rustc_builtin_macros"
44
version = "0.0.0"
55
edition = "2018"
66

77
[lib]
8-
name = "syntax_ext"
8+
name = "rustc_builtin_macros"
99
path = "lib.rs"
1010
doctest = false
1111

@@ -19,6 +19,6 @@ rustc_parse = { path = "../librustc_parse" }
1919
rustc_target = { path = "../librustc_target" }
2020
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
2121
syntax = { path = "../libsyntax" }
22-
syntax_expand = { path = "../libsyntax_expand" }
23-
syntax_pos = { path = "../libsyntax_pos" }
22+
rustc_expand = { path = "../librustc_expand" }
23+
syntax_pos = { path = "../librustc_span", package = "rustc_span" }
2424
rustc_error_codes = { path = "../librustc_error_codes" }

src/libsyntax_ext/asm.rs renamed to src/librustc_builtin_macros/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
use State::*;
44

55
use errors::{DiagnosticBuilder, PResult};
6+
use rustc_expand::base::*;
67
use rustc_parse::parser::Parser;
78
use syntax::ast::{self, AsmDialect};
89
use syntax::ptr::P;
910
use syntax::symbol::{kw, sym, Symbol};
1011
use syntax::token::{self, Token};
1112
use syntax::tokenstream::{self, TokenStream};
1213
use syntax::{span_err, struct_span_err};
13-
use syntax_expand::base::*;
1414
use syntax_pos::Span;
1515

1616
use rustc_error_codes::*;

src/libsyntax_ext/assert.rs renamed to src/librustc_builtin_macros/assert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
use errors::{Applicability, DiagnosticBuilder};
22

3+
use rustc_expand::base::*;
34
use rustc_parse::parser::Parser;
45
use syntax::ast::{self, *};
56
use syntax::print::pprust;
67
use syntax::ptr::P;
78
use syntax::symbol::{sym, Symbol};
89
use syntax::token::{self, TokenKind};
910
use syntax::tokenstream::{DelimSpan, TokenStream, TokenTree};
10-
use syntax_expand::base::*;
1111
use syntax_pos::{Span, DUMMY_SP};
1212

1313
pub fn expand_assert<'cx>(

src/libsyntax_ext/cfg.rs renamed to src/librustc_builtin_macros/cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
/// current compilation environment.
44
use errors::DiagnosticBuilder;
55

6+
use rustc_expand::base::{self, *};
67
use syntax::ast;
78
use syntax::attr;
89
use syntax::token;
910
use syntax::tokenstream::TokenStream;
10-
use syntax_expand::base::{self, *};
1111
use syntax_pos::Span;
1212

1313
pub fn expand_cfg(

src/libsyntax_ext/cmdline_attrs.rs renamed to src/librustc_builtin_macros/cmdline_attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! Attributes injected into the crate root from command line using `-Z crate-attr`.
22
3+
use rustc_expand::panictry;
34
use syntax::ast::{self, AttrItem, AttrStyle};
45
use syntax::attr::mk_attr;
56
use syntax::sess::ParseSess;
67
use syntax::token;
7-
use syntax_expand::panictry;
88
use syntax_pos::FileName;
99

1010
pub fn inject(mut krate: ast::Crate, parse_sess: &ParseSess, attrs: &[String]) -> ast::Crate {

src/libsyntax_ext/compile_error.rs renamed to src/librustc_builtin_macros/compile_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// The compiler code necessary to support the compile_error! extension.
22

3+
use rustc_expand::base::{self, *};
34
use syntax::tokenstream::TokenStream;
4-
use syntax_expand::base::{self, *};
55
use syntax_pos::Span;
66

77
pub fn expand_compile_error<'cx>(

src/libsyntax_ext/concat.rs renamed to src/librustc_builtin_macros/concat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
use rustc_expand::base::{self, DummyResult};
12
use syntax::ast;
23
use syntax::symbol::Symbol;
34
use syntax::tokenstream::TokenStream;
4-
use syntax_expand::base::{self, DummyResult};
55

66
use std::string::String;
77

0 commit comments

Comments
 (0)