Remove #[macro_use] extern crate tracing from rustc_resolve.

Explicit imports are more standard nowadays and easier to read.
This commit is contained in:
Nicholas Nethercote 2024-05-10 13:46:24 +10:00
parent 41aea279e5
commit d1f5beeed5
10 changed files with 15 additions and 9 deletions

View File

@ -32,6 +32,8 @@
use std::cell::Cell;
use tracing::debug;
type Res = def::Res<NodeId>;
impl<'a, Id: Into<DefId>> ToNameBinding<'a>

View File

@ -7,6 +7,7 @@
use rustc_span::hygiene::LocalExpnId;
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use tracing::debug;
pub(crate) fn collect_definitions(
resolver: &mut Resolver<'_, '_>,

View File

@ -28,6 +28,7 @@
use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{BytePos, Span, SyntaxContext};
use thin_vec::{thin_vec, ThinVec};
use tracing::debug;
use crate::errors::{
self, AddedMacroUse, ChangeImportBinding, ChangeImportBindingSuggestion, ConsiderAddingADerive,

View File

@ -11,6 +11,7 @@
use rustc_middle::middle::privacy::{EffectiveVisibilities, EffectiveVisibility};
use rustc_middle::ty::Visibility;
use std::mem;
use tracing::info;
#[derive(Clone, Copy)]
enum ParentId<'a> {

View File

@ -11,6 +11,7 @@
use rustc_span::sym;
use rustc_span::symbol::{kw, Ident};
use rustc_span::Span;
use tracing::{debug, instrument};
use crate::errors::{ParamKindInEnumDiscriminant, ParamKindInNonTrivialAnonConst};
use crate::late::{ConstantHasGenerics, NoConstantGenericsReason, PathSource, Rib, RibKind};

View File

@ -34,6 +34,7 @@
use rustc_span::symbol::{kw, Ident, Symbol};
use rustc_span::Span;
use smallvec::SmallVec;
use tracing::debug;
use std::cell::Cell;
use std::mem;

View File

@ -30,6 +30,7 @@
use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{BytePos, Span, SyntaxContext};
use smallvec::{smallvec, SmallVec};
use tracing::{debug, instrument, trace};
use std::assert_matches::debug_assert_matches;
use std::borrow::Cow;

View File

@ -40,6 +40,7 @@
use std::ops::Deref;
use thin_vec::ThinVec;
use tracing::debug;
use super::NoConstantGenericsReason;

View File

@ -23,12 +23,6 @@
#![feature(rustdoc_internals)]
// tidy-alphabetical-end
#[macro_use]
extern crate tracing;
use errors::{
ParamKindInEnumDiscriminant, ParamKindInNonTrivialAnonConst, ParamKindInTyOfConstParam,
};
use rustc_arena::{DroplessArena, TypedArena};
use rustc_ast::expand::StrippedCfgItem;
use rustc_ast::node_id::NodeMap;
@ -61,19 +55,21 @@
use rustc_span::hygiene::{ExpnId, LocalExpnId, MacroKind, SyntaxContext, Transparency};
use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{Span, DUMMY_SP};
use smallvec::{smallvec, SmallVec};
use std::cell::{Cell, RefCell};
use std::collections::BTreeSet;
use std::fmt;
use tracing::debug;
use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion};
use effective_visibilities::EffectiveVisibilitiesVisitor;
use errors::{
ParamKindInEnumDiscriminant, ParamKindInNonTrivialAnonConst, ParamKindInTyOfConstParam,
};
use imports::{Import, ImportData, ImportKind, NameResolution};
use late::{HasGenericParams, PathSource, PatternSource, UnnecessaryQualification};
use macros::{MacroRulesBinding, MacroRulesScope, MacroRulesScopeRef};
use crate::effective_visibilities::EffectiveVisibilitiesVisitor;
type Res = def::Res<NodeId>;
mod build_reduced_graph;

View File

@ -8,6 +8,7 @@
use rustc_span::{InnerSpan, Span, DUMMY_SP};
use std::mem;
use std::ops::Range;
use tracing::{debug, trace};
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum DocFragmentKind {