Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e08c279

Browse files
committed
Rename syntax to rustc_ast in source code
1 parent 6054a30 commit e08c279

File tree

291 files changed

+650
-637
lines changed

Some content is hidden

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

291 files changed

+650
-637
lines changed

src/doc/unstable-book/src/language-features/plugin.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ that warns about any item named `lintme`.
4242
#![feature(plugin_registrar)]
4343
#![feature(box_syntax, rustc_private)]
4444
45-
extern crate syntax;
45+
extern crate rustc_ast;
4646
4747
// Load rustc as a plugin to get macros
4848
#[macro_use]
@@ -52,7 +52,7 @@ extern crate rustc_driver;
5252
use rustc::lint::{EarlyContext, LintContext, LintPass, EarlyLintPass,
5353
EarlyLintPassObject, LintArray};
5454
use rustc_driver::plugin::Registry;
55-
use syntax::ast;
55+
use rustc_ast::ast;
5656
5757
declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
5858

src/librustc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
2828
rustc_errors = { path = "../librustc_errors" }
2929
rustc_index = { path = "../librustc_index" }
3030
rustc_serialize = { path = "../libserialize", package = "serialize" }
31-
syntax = { path = "../librustc_ast", package = "rustc_ast" }
31+
rustc_ast = { path = "../librustc_ast" }
3232
rustc_span = { path = "../librustc_span" }
3333
backtrace = "0.3.40"
3434
parking_lot = "0.9"

src/librustc/arena.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ macro_rules! arena_types {
131131
// HIR types
132132
[few] hir_krate: rustc_hir::Crate<$tcx>,
133133
[] arm: rustc_hir::Arm<$tcx>,
134-
[] attribute: syntax::ast::Attribute,
134+
[] attribute: rustc_ast::ast::Attribute,
135135
[] block: rustc_hir::Block<$tcx>,
136136
[] bare_fn_ty: rustc_hir::BareFnTy<$tcx>,
137137
[few] global_asm: rustc_hir::GlobalAsm,

src/librustc/dep_graph/safe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
33
use crate::ty::TyCtxt;
44

5+
use rustc_ast::ast::NodeId;
56
use rustc_hir::def_id::DefId;
67
use rustc_hir::BodyId;
7-
use syntax::ast::NodeId;
88

99
/// The `DepGraphSafe` trait is used to specify what kinds of values
1010
/// are safe to "leak" into a task. The idea is that this should be

src/librustc/hir/exports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use crate::ty;
22

3+
use rustc_ast::ast;
34
use rustc_hir::def::Res;
45
use rustc_hir::def_id::DefIdMap;
56
use rustc_macros::HashStable;
67
use rustc_span::Span;
7-
use syntax::ast;
88

99
use std::fmt::Debug;
1010

src/librustc/hir/map/blocks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
//! for the `Code` associated with a particular NodeId.
1313
1414
use crate::hir::map::Map;
15+
use rustc_ast::ast::{Attribute, Ident};
1516
use rustc_hir as hir;
1617
use rustc_hir::intravisit::FnKind;
1718
use rustc_hir::{Expr, FnDecl, Node};
1819
use rustc_span::Span;
19-
use syntax::ast::{Attribute, Ident};
2020

2121
/// An FnLikeNode is a Node that is like a fn, in that it has a decl
2222
/// and a body (as well as a NodeId, a span, etc).

src/librustc/hir/map/collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use crate::hir::map::definitions::{self, DefPathHash};
33
use crate::hir::map::{Entry, HirEntryMap, Map};
44
use crate::ich::StableHashingContext;
55
use crate::middle::cstore::CrateStore;
6+
use rustc_ast::ast::NodeId;
67
use rustc_data_structures::fingerprint::Fingerprint;
78
use rustc_data_structures::fx::FxHashMap;
89
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
@@ -16,7 +17,6 @@ use rustc_index::vec::IndexVec;
1617
use rustc_session::{CrateDisambiguator, Session};
1718
use rustc_span::source_map::SourceMap;
1819
use rustc_span::{Span, Symbol, DUMMY_SP};
19-
use syntax::ast::NodeId;
2020

2121
use std::iter::repeat;
2222

src/librustc/hir/map/definitions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//! There are also some rather random cases (like const initializer
55
//! expressions) that are mostly just leftovers.
66
7+
use rustc_ast::ast;
8+
use rustc_ast::node_id::NodeMap;
79
use rustc_data_structures::fingerprint::Fingerprint;
810
use rustc_data_structures::fx::FxHashMap;
911
use rustc_data_structures::stable_hasher::StableHasher;
@@ -14,8 +16,6 @@ use rustc_session::CrateDisambiguator;
1416
use rustc_span::hygiene::ExpnId;
1517
use rustc_span::symbol::{sym, Symbol};
1618
use rustc_span::Span;
17-
use syntax::ast;
18-
use syntax::node_id::NodeMap;
1919

2020
use std::borrow::Borrow;
2121
use std::fmt::Write;

src/librustc/hir/map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub use self::definitions::{
66
use crate::dep_graph::{DepGraph, DepKind, DepNode, DepNodeIndex};
77
use crate::middle::cstore::CrateStoreDyn;
88
use crate::ty::query::Providers;
9+
use rustc_ast::ast::{self, Name, NodeId};
910
use rustc_data_structures::fx::FxHashMap;
1011
use rustc_data_structures::svh::Svh;
1112
use rustc_hir::def::{DefKind, Res};
@@ -20,7 +21,6 @@ use rustc_span::source_map::Spanned;
2021
use rustc_span::symbol::kw;
2122
use rustc_span::Span;
2223
use rustc_target::spec::abi::Abi;
23-
use syntax::ast::{self, Name, NodeId};
2424

2525
pub mod blocks;
2626
mod collector;

src/librustc/ich/hcx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::middle::cstore::CrateStore;
55
use crate::session::Session;
66
use crate::ty::{fast_reject, TyCtxt};
77

8+
use rustc_ast::ast;
89
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
910
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
1011
use rustc_data_structures::sync::Lrc;
@@ -13,7 +14,6 @@ use rustc_hir::def_id::{DefId, DefIndex};
1314
use rustc_span::source_map::SourceMap;
1415
use rustc_span::symbol::Symbol;
1516
use rustc_span::{BytePos, SourceFile};
16-
use syntax::ast;
1717

1818
use smallvec::SmallVec;
1919
use std::cmp::Ord;

0 commit comments

Comments
 (0)