Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-dead
Remove many `#[macro_use] extern crate foo` items This requires the addition of more `use` items, which often make the code more verbose. But they also make the code easier to read, because `#[macro_use]` obscures where macros are defined. r? `@fee1-dead`
This commit is contained in:
commit
784316eadc
320 changed files with 375 additions and 287 deletions
|
@ -32,7 +32,7 @@ use rustc_data_structures::packed::Pu128;
|
|||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_macros::HashStable_Generic;
|
||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||
use rustc_span::source_map::{respan, Spanned};
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use rustc_macros::HashStable_Generic;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
|
||||
#[derive(Clone, Debug, Copy, Eq, PartialEq, HashStable_Generic)]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//! Definitions shared by macros / syntax extensions and e.g. `rustc_middle`.
|
||||
|
||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||
use rustc_span::{def_id::DefId, symbol::Ident};
|
||||
|
||||
use crate::MetaItem;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use crate::ptr::P;
|
||||
use crate::Expr;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_macros::{Decodable, Encodable};
|
||||
use rustc_span::symbol::{Ident, Symbol};
|
||||
use rustc_span::Span;
|
||||
|
||||
|
|
|
@ -20,12 +20,6 @@
|
|||
#![feature(negative_impls)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_macros;
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
pub mod util {
|
||||
pub mod case;
|
||||
pub mod classify;
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::util::case::Case;
|
|||
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_macros::HashStable_Generic;
|
||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||
use rustc_span::symbol::{kw, sym};
|
||||
#[allow(clippy::useless_attribute)] // FIXME: following use of `hidden_glob_reexports` incorrectly triggers `useless_attribute` lint.
|
||||
#[allow(hidden_glob_reexports)]
|
||||
|
|
|
@ -20,7 +20,7 @@ use crate::AttrVec;
|
|||
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::sync::{self, Lrc};
|
||||
use rustc_macros::HashStable_Generic;
|
||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||
use rustc_serialize::{Decodable, Encodable};
|
||||
use rustc_span::{sym, Span, SpanDecoder, SpanEncoder, Symbol, DUMMY_SP};
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
|
|
@ -8,6 +8,7 @@ use rustc_lexer::unescape::{
|
|||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use std::{ascii, fmt, str};
|
||||
use tracing::debug;
|
||||
|
||||
// Escapes a string, represented as a symbol. Reuses the original symbol,
|
||||
// avoiding interning, if no changes are required.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue