Always import all tracing macros for the entire crate instead of piecemeal by module
This commit is contained in:
parent
d3b22c7267
commit
ee3c835018
88 changed files with 76 additions and 119 deletions
|
@ -59,7 +59,6 @@ use rustc_trait_selection::traits::{self, misc::can_type_implement_copy};
|
|||
use crate::nonstandard_style::{method_context, MethodLateContext};
|
||||
|
||||
use std::fmt::Write;
|
||||
use tracing::{debug, trace};
|
||||
|
||||
// hardwired lints from librustc_middle
|
||||
pub use rustc_session::lint::builtin::*;
|
||||
|
|
|
@ -45,7 +45,6 @@ use rustc_span::lev_distance::find_best_match_for_name;
|
|||
use rustc_span::symbol::{sym, Ident, Symbol};
|
||||
use rustc_span::{BytePos, Span};
|
||||
use rustc_target::abi;
|
||||
use tracing::debug;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::iter;
|
||||
|
@ -417,7 +416,7 @@ impl LintStore {
|
|||
None => {
|
||||
// 1. The tool is currently running, so this lint really doesn't exist.
|
||||
// FIXME: should this handle tools that never register a lint, like rustfmt?
|
||||
tracing::debug!("lints={:?}", self.by_name.keys().collect::<Vec<_>>());
|
||||
debug!("lints={:?}", self.by_name.keys().collect::<Vec<_>>());
|
||||
let tool_prefix = format!("{}::", tool_name);
|
||||
return if self.by_name.keys().any(|lint| lint.starts_with(&tool_prefix)) {
|
||||
self.no_lint_suggestion(&complete_name)
|
||||
|
@ -510,7 +509,7 @@ impl LintStore {
|
|||
CheckLintNameResult::Tool(Err((Some(slice::from_ref(id)), complete_name)))
|
||||
}
|
||||
Some(other) => {
|
||||
tracing::debug!("got renamed lint {:?}", other);
|
||||
debug!("got renamed lint {:?}", other);
|
||||
CheckLintNameResult::NoLint(None)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ use rustc_span::symbol::Ident;
|
|||
use rustc_span::Span;
|
||||
|
||||
use std::slice;
|
||||
use tracing::debug;
|
||||
|
||||
macro_rules! run_early_pass { ($cx:expr, $f:ident, $($args:expr),*) => ({
|
||||
$cx.pass.$f(&$cx.context, $($args),*);
|
||||
|
|
|
@ -12,7 +12,6 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
|
|||
use rustc_span::hygiene::{ExpnKind, MacroKind};
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use tracing::debug;
|
||||
|
||||
declare_tool_lint! {
|
||||
pub rustc::DEFAULT_HASH_TYPES,
|
||||
|
|
|
@ -29,7 +29,6 @@ use rustc_span::Span;
|
|||
use std::any::Any;
|
||||
use std::cell::Cell;
|
||||
use std::slice;
|
||||
use tracing::debug;
|
||||
|
||||
/// Extract the `LintStore` from the query context.
|
||||
/// This function exists because we've erased `LintStore` as `dyn Any` in the context.
|
||||
|
|
|
@ -21,7 +21,6 @@ use rustc_session::parse::{add_feature_diagnostics, feature_err};
|
|||
use rustc_session::Session;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use tracing::debug;
|
||||
|
||||
use crate::errors::{
|
||||
MalformedAttribute, MalformedAttributeSub, OverruledAttribute, OverruledAttributeSub,
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
extern crate rustc_middle;
|
||||
#[macro_use]
|
||||
extern crate rustc_session;
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
mod array_into_iter;
|
||||
pub mod builtin;
|
||||
|
|
|
@ -19,7 +19,6 @@ use rustc_target::spec::abi::Abi as SpecAbi;
|
|||
use std::cmp;
|
||||
use std::iter;
|
||||
use std::ops::ControlFlow;
|
||||
use tracing::debug;
|
||||
|
||||
declare_lint! {
|
||||
/// The `unused_comparisons` lint detects comparisons made useless by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue