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

Commit 4814fd0

Browse files
committed
Remove extern crate rustc_macros from numerous crates.
1 parent 10505a1 commit 4814fd0

File tree

110 files changed

+99
-94
lines changed

Some content is hidden

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

110 files changed

+99
-94
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use rustc_data_structures::packed::Pu128;
3232
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
3333
use rustc_data_structures::stack::ensure_sufficient_stack;
3434
use rustc_data_structures::sync::Lrc;
35-
use rustc_macros::HashStable_Generic;
35+
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
3636
use rustc_span::source_map::{respan, Spanned};
3737
use rustc_span::symbol::{kw, sym, Ident, Symbol};
3838
use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP};

compiler/rustc_ast/src/expand/allocator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use rustc_macros::HashStable_Generic;
12
use rustc_span::symbol::{sym, Symbol};
23

34
#[derive(Clone, Debug, Copy, Eq, PartialEq, HashStable_Generic)]

compiler/rustc_ast/src/expand/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Definitions shared by macros / syntax extensions and e.g. `rustc_middle`.
22
3+
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
34
use rustc_span::{def_id::DefId, symbol::Ident};
45

56
use crate::MetaItem;

compiler/rustc_ast/src/format.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::ptr::P;
22
use crate::Expr;
33
use rustc_data_structures::fx::FxHashMap;
4+
use rustc_macros::{Decodable, Encodable};
45
use rustc_span::symbol::{Ident, Symbol};
56
use rustc_span::Span;
67

compiler/rustc_ast/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
#![feature(negative_impls)]
2121
#![feature(stmt_expr_attributes)]
2222

23-
#[macro_use]
24-
extern crate rustc_macros;
25-
2623
#[macro_use]
2724
extern crate tracing;
2825

compiler/rustc_ast/src/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::util::case::Case;
99

1010
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1111
use rustc_data_structures::sync::Lrc;
12-
use rustc_macros::HashStable_Generic;
12+
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
1313
use rustc_span::symbol::{kw, sym};
1414
#[allow(clippy::useless_attribute)] // FIXME: following use of `hidden_glob_reexports` incorrectly triggers `useless_attribute` lint.
1515
#[allow(hidden_glob_reexports)]

compiler/rustc_ast/src/tokenstream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::AttrVec;
2020

2121
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
2222
use rustc_data_structures::sync::{self, Lrc};
23-
use rustc_macros::HashStable_Generic;
23+
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
2424
use rustc_serialize::{Decodable, Encodable};
2525
use rustc_span::{sym, Span, SpanDecoder, SpanEncoder, Symbol, DUMMY_SP};
2626
use smallvec::{smallvec, SmallVec};

compiler/rustc_ast_ir/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
#![cfg_attr(feature = "nightly", allow(internal_features))]
44

55
#[cfg(feature = "nightly")]
6-
#[macro_use]
7-
extern crate rustc_macros;
6+
use rustc_macros::{Decodable, Encodable, HashStable_NoContext};
87

98
pub mod visit;
109

compiler/rustc_attr/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_ast::{Attribute, LitKind, MetaItem, MetaItemKind, MetaItemLit, NestedM
66
use rustc_ast_pretty::pprust;
77
use rustc_errors::ErrorGuaranteed;
88
use rustc_feature::{find_gated_cfg, is_builtin_attr_name, Features, GatedCfg};
9-
use rustc_macros::HashStable_Generic;
9+
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
1010
use rustc_session::config::ExpectedValues;
1111
use rustc_session::lint::builtin::UNEXPECTED_CFGS;
1212
use rustc_session::lint::BuiltinLintDiag;

compiler/rustc_attr/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
#![doc(rust_logo)]
1010
#![feature(let_chains)]
1111

12-
#[macro_use]
13-
extern crate rustc_macros;
14-
1512
mod builtin;
1613
mod session_diagnostics;
1714

0 commit comments

Comments
 (0)