Skip to content

Commit fb12c70

Browse files
committed
rustc, rustc_passes: don't depend on syntax_expand.
This is done by moving some data definitions to syntax::expand.
1 parent 1632940 commit fb12c70

Some content is hidden

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

50 files changed

+94
-91
lines changed

Cargo.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,7 +3135,6 @@ dependencies = [
31353135
"serialize",
31363136
"smallvec",
31373137
"syntax",
3138-
"syntax_expand",
31393138
"syntax_pos",
31403139
]
31413140

@@ -3451,7 +3450,6 @@ dependencies = [
34513450
"rustc_target",
34523451
"serialize",
34533452
"syntax",
3454-
"syntax_expand",
34553453
"syntax_pos",
34563454
"tempfile",
34573455
]
@@ -3707,7 +3705,6 @@ dependencies = [
37073705
"rustc_index",
37083706
"rustc_target",
37093707
"syntax",
3710-
"syntax_expand",
37113708
"syntax_pos",
37123709
]
37133710

src/librustc/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ rustc_index = { path = "../librustc_index" }
2929
errors = { path = "../librustc_errors", package = "rustc_errors" }
3030
rustc_serialize = { path = "../libserialize", package = "serialize" }
3131
syntax = { path = "../libsyntax" }
32-
syntax_expand = { path = "../libsyntax_expand" }
3332
syntax_pos = { path = "../libsyntax_pos" }
3433
backtrace = "0.3.3"
3534
parking_lot = "0.9"

src/librustc/hir/def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::ty;
66
use crate::util::nodemap::DefIdMap;
77

88
use syntax::ast;
9-
use syntax_expand::base::MacroKind;
109
use syntax::ast::NodeId;
10+
use syntax_pos::hygiene::MacroKind;
1111
use syntax_pos::Span;
1212
use rustc_macros::HashStable;
1313

src/librustc/hir/lowering.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ use syntax::ast;
6464
use syntax::ptr::P as AstP;
6565
use syntax::ast::*;
6666
use syntax::errors;
67-
use syntax_expand::base::SpecialDerives;
67+
use syntax::expand::SpecialDerives;
6868
use syntax::print::pprust;
6969
use syntax::parse::token::{self, Nonterminal, Token};
7070
use syntax::tokenstream::{TokenStream, TokenTree};

src/librustc/hir/lowering/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use smallvec::SmallVec;
1818
use syntax::attr;
1919
use syntax::ast::*;
2020
use syntax::visit::{self, Visitor};
21-
use syntax_expand::base::SpecialDerives;
21+
use syntax::expand::SpecialDerives;
2222
use syntax::source_map::{respan, DesugaringKind, Spanned};
2323
use syntax::symbol::{kw, sym};
2424
use syntax_pos::Span;

src/librustc/hir/map/def_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ use crate::hir::map::definitions::*;
22
use crate::hir::def_id::DefIndex;
33

44
use syntax::ast::*;
5-
use syntax_expand::hygiene::ExpnId;
65
use syntax::visit;
76
use syntax::symbol::{kw, sym};
87
use syntax::parse::token::{self, Token};
8+
use syntax_pos::hygiene::ExpnId;
99
use syntax_pos::Span;
1010

1111
/// Creates `DefId`s for nodes in the AST.

src/librustc/hir/map/definitions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use std::borrow::Borrow;
1717
use std::fmt::Write;
1818
use std::hash::Hash;
1919
use syntax::ast;
20-
use syntax_expand::hygiene::ExpnId;
21-
use syntax::symbol::{Symbol, sym};
20+
use syntax_pos::symbol::{Symbol, sym};
21+
use syntax_pos::hygiene::ExpnId;
2222
use syntax_pos::{Span, DUMMY_SP};
2323

2424
/// The `DefPathTable` maps `DefIndex`es to `DefKey`s and vice versa.

src/librustc/hir/map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rustc_data_structures::svh::Svh;
2020
use rustc_index::vec::IndexVec;
2121
use syntax::ast::{self, Name, NodeId};
2222
use syntax::source_map::Spanned;
23-
use syntax_expand::base::MacroKind;
23+
use syntax_pos::hygiene::MacroKind;
2424
use syntax_pos::{Span, DUMMY_SP};
2525

2626
pub mod blocks;

src/librustc/ich/hcx.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ use std::cell::RefCell;
1313

1414
use syntax::ast;
1515
use syntax::source_map::SourceMap;
16-
use syntax_expand::hygiene::SyntaxContext;
1716
use syntax::symbol::Symbol;
1817
use syntax::tokenstream::DelimSpan;
1918
use syntax_pos::{Span, DUMMY_SP};
20-
use syntax_pos::hygiene;
19+
use syntax_pos::hygiene::{self, SyntaxContext};
2120

2221
use rustc_data_structures::stable_hasher::{
2322
HashStable, StableHasher, ToStableHashKey,

src/librustc/ich/impls_syntax.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl_stable_hash_for!(enum ::syntax::ast::AsmDialect {
6060
Intel
6161
});
6262

63-
impl_stable_hash_for!(enum ::syntax_expand::base::MacroKind {
63+
impl_stable_hash_for!(enum ::syntax_pos::hygiene::MacroKind {
6464
Bang,
6565
Attr,
6666
Derive,

0 commit comments

Comments
 (0)