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
|
@ -7,6 +7,7 @@ use rustc_index::IndexVec;
|
|||
use rustc_middle::span_bug;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
/// A visitor that walks over the HIR and collects `Node`s into a HIR map.
|
||||
struct NodeCollector<'a, 'hir> {
|
||||
|
|
|
@ -20,6 +20,7 @@ use rustc_span::{DesugaringKind, Span, Symbol};
|
|||
use rustc_target::spec::abi;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use thin_vec::ThinVec;
|
||||
use tracing::instrument;
|
||||
|
||||
pub(super) struct ItemLowerer<'a, 'hir> {
|
||||
pub(super) tcx: TyCtxt<'hir>,
|
||||
|
|
|
@ -37,11 +37,7 @@
|
|||
#![feature(box_patterns)]
|
||||
#![feature(let_chains)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
use crate::errors::{AssocTyParentheses, AssocTyParenthesesSub, MisplacedImplTrait};
|
||||
|
||||
use rustc_ast::node_id::NodeMap;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::{self as ast, *};
|
||||
|
@ -69,6 +65,7 @@ use rustc_span::{DesugaringKind, Span, DUMMY_SP};
|
|||
use smallvec::{smallvec, SmallVec};
|
||||
use std::collections::hash_map::Entry;
|
||||
use thin_vec::ThinVec;
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
macro_rules! arena_vec {
|
||||
($this:expr; $($x:expr),*) => (
|
||||
|
|
|
@ -18,6 +18,7 @@ use rustc_span::symbol::{kw, sym, Ident};
|
|||
use rustc_span::{BytePos, DesugaringKind, Span, Symbol, DUMMY_SP};
|
||||
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
#[instrument(level = "trace", skip(self))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue