Always import all tracing macros for the entire crate instead of piecemeal by module

This commit is contained in:
Oli Scherer 2022-08-31 13:09:26 +00:00
parent d3b22c7267
commit ee3c835018
88 changed files with 76 additions and 119 deletions

View file

@ -39,7 +39,7 @@ impl<'r, 'a> AccessLevelsVisitor<'r, 'a> {
visit::walk_crate(&mut visitor, krate);
}
tracing::info!("resolve::access_levels: {:#?}", r.access_levels);
info!("resolve::access_levels: {:#?}", r.access_levels);
}
fn reset(&mut self) {

View file

@ -36,7 +36,6 @@ use rustc_span::Span;
use std::cell::Cell;
use std::ptr;
use tracing::debug;
type Res = def::Res<NodeId>;

View file

@ -8,7 +8,6 @@ use rustc_hir::definitions::*;
use rustc_span::hygiene::LocalExpnId;
use rustc_span::symbol::sym;
use rustc_span::Span;
use tracing::debug;
pub(crate) fn collect_definitions(
resolver: &mut Resolver<'_>,

View file

@ -25,7 +25,6 @@ use rustc_span::lev_distance::find_best_match_for_name;
use rustc_span::source_map::SourceMap;
use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{BytePos, Span};
use tracing::debug;
use crate::imports::{Import, ImportKind, ImportResolver};
use crate::late::{PatternSource, Rib};

View file

@ -23,8 +23,6 @@ use rustc_span::lev_distance::find_best_match_for_name;
use rustc_span::symbol::{kw, Ident, Symbol};
use rustc_span::Span;
use tracing::*;
use std::cell::Cell;
use std::{mem, ptr};

View file

@ -32,7 +32,6 @@ use smallvec::{smallvec, SmallVec};
use rustc_span::source_map::{respan, Spanned};
use std::collections::{hash_map::Entry, BTreeSet};
use std::mem::{replace, take};
use tracing::debug;
mod diagnostics;
pub(crate) mod lifetimes;
@ -3268,11 +3267,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
source: PathSource<'ast>,
finalize: Finalize,
) -> PartialRes {
tracing::debug!(
debug!(
"smart_resolve_path_fragment(qself={:?}, path={:?}, finalize={:?})",
qself,
path,
finalize,
qself, path, finalize,
);
let ns = source.namespace();

View file

@ -33,8 +33,6 @@ use rustc_span::{BytePos, Span};
use std::iter;
use std::ops::Deref;
use tracing::debug;
type Res = def::Res<ast::NodeId>;
/// A field or associated item from self type suggested in case of resolution failure.

View file

@ -1212,7 +1212,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
scope: &wrap_scope,
trait_definition_only: self.trait_definition_only,
};
let span = tracing::debug_span!("scope", scope = ?TruncatedScopeDebug(&this.scope));
let span = debug_span!("scope", scope = ?TruncatedScopeDebug(&this.scope));
{
let _enter = span.enter();
f(&mut this);

View file

@ -58,7 +58,6 @@ use smallvec::{smallvec, SmallVec};
use std::cell::{Cell, RefCell};
use std::collections::BTreeSet;
use std::{cmp, fmt, ptr};
use tracing::debug;
use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion};
use imports::{Import, ImportKind, ImportResolver, NameResolution};