Remove #[macro_use] extern crate tracing from rustc_lint.

This commit is contained in:
Nicholas Nethercote 2024-05-22 14:09:17 +10:00
parent c4bdd298fe
commit c7da1a5bb8
11 changed files with 10 additions and 6 deletions

View file

@ -70,6 +70,7 @@ use rustc_target::abi::Abi;
use rustc_trait_selection::infer::{InferCtxtExt, TyCtxtInferExt}; use rustc_trait_selection::infer::{InferCtxtExt, TyCtxtInferExt};
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _; use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
use rustc_trait_selection::traits::{self, misc::type_allowed_to_implement_copy}; use rustc_trait_selection::traits::{self, misc::type_allowed_to_implement_copy};
use tracing::debug;
use crate::nonstandard_style::{method_context, MethodLateContext}; use crate::nonstandard_style::{method_context, MethodLateContext};

View file

@ -39,10 +39,10 @@ use rustc_span::edit_distance::find_best_match_for_names;
use rustc_span::symbol::{sym, Ident, Symbol}; use rustc_span::symbol::{sym, Ident, Symbol};
use rustc_span::Span; use rustc_span::Span;
use rustc_target::abi; use rustc_target::abi;
use std::cell::Cell; use std::cell::Cell;
use std::iter; use std::iter;
use std::slice; use std::slice;
use tracing::debug;
mod diagnostics; mod diagnostics;

View file

@ -9,6 +9,7 @@ use rustc_errors::{elided_lifetime_in_path_suggestion, DiagArgValue, MultiSpan};
use rustc_middle::middle::stability; use rustc_middle::middle::stability;
use rustc_session::lint::{BuiltinLintDiag, Lint}; use rustc_session::lint::{BuiltinLintDiag, Lint};
use rustc_span::BytePos; use rustc_span::BytePos;
use tracing::debug;
use crate::{lints, EarlyContext, LintContext as _}; use crate::{lints, EarlyContext, LintContext as _};

View file

@ -26,6 +26,7 @@ use rustc_session::lint::{BufferedEarlyLint, LintBuffer, LintPass};
use rustc_session::Session; use rustc_session::Session;
use rustc_span::symbol::Ident; use rustc_span::symbol::Ident;
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
macro_rules! lint_callback { ($cx:expr, $f:ident, $($args:expr),*) => ({ macro_rules! lint_callback { ($cx:expr, $f:ident, $($args:expr),*) => ({
$cx.pass.$f(&$cx.context, $($args),*); $cx.pass.$f(&$cx.context, $($args),*);

View file

@ -8,6 +8,7 @@ use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
use rustc_session::declare_lint; use rustc_session::declare_lint;
use rustc_span::{sym, Span, Symbol}; use rustc_span::{sym, Span, Symbol};
use rustc_target::abi::FIRST_VARIANT; use rustc_target::abi::FIRST_VARIANT;
use tracing::{debug, instrument};
use crate::lints::{BuiltinClashingExtern, BuiltinClashingExternSub}; use crate::lints::{BuiltinClashingExtern, BuiltinClashingExternSub};
use crate::{types, LintVec}; use crate::{types, LintVec};

View file

@ -15,6 +15,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::hygiene::{ExpnKind, MacroKind}; use rustc_span::hygiene::{ExpnKind, MacroKind};
use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
declare_tool_lint! { declare_tool_lint! {
/// The `default_hash_type` lint detects use of [`std::collections::HashMap`]/[`std::collections::HashSet`], /// The `default_hash_type` lint detects use of [`std::collections::HashMap`]/[`std::collections::HashSet`],

View file

@ -26,9 +26,9 @@ use rustc_middle::ty::{self, TyCtxt};
use rustc_session::lint::LintPass; use rustc_session::lint::LintPass;
use rustc_session::Session; use rustc_session::Session;
use rustc_span::Span; use rustc_span::Span;
use std::any::Any; use std::any::Any;
use std::cell::Cell; use std::cell::Cell;
use tracing::debug;
/// Extract the [`LintStore`] from [`Session`]. /// Extract the [`LintStore`] from [`Session`].
/// ///

View file

@ -41,6 +41,7 @@ use rustc_session::parse::feature_err;
use rustc_session::Session; use rustc_session::Session;
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument};
use crate::errors::{ use crate::errors::{
MalformedAttribute, MalformedAttributeSub, OverruledAttribute, OverruledAttributeSub, MalformedAttribute, MalformedAttributeSub, OverruledAttribute, OverruledAttributeSub,

View file

@ -39,9 +39,6 @@
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#![allow(internal_features)] #![allow(internal_features)]
#[macro_use]
extern crate tracing;
mod async_fn_in_trait; mod async_fn_in_trait;
pub mod builtin; pub mod builtin;
mod context; mod context;

View file

@ -31,9 +31,9 @@ use rustc_span::{Span, Symbol};
use rustc_target::abi::{Abi, Size, WrappingRange}; use rustc_target::abi::{Abi, Size, WrappingRange};
use rustc_target::abi::{Integer, TagEncoding, Variants}; use rustc_target::abi::{Integer, TagEncoding, Variants};
use rustc_target::spec::abi::Abi as SpecAbi; use rustc_target::spec::abi::Abi as SpecAbi;
use std::iter; use std::iter;
use std::ops::ControlFlow; use std::ops::ControlFlow;
use tracing::debug;
declare_lint! { declare_lint! {
/// The `unused_comparisons` lint detects comparisons made useless by /// The `unused_comparisons` lint detects comparisons made useless by

View file

@ -22,6 +22,7 @@ use rustc_span::symbol::{kw, sym};
use rustc_span::{BytePos, Span}; use rustc_span::{BytePos, Span};
use std::iter; use std::iter;
use std::ops::ControlFlow; use std::ops::ControlFlow;
use tracing::instrument;
declare_lint! { declare_lint! {
/// The `unused_must_use` lint detects unused result of a type flagged as /// The `unused_must_use` lint detects unused result of a type flagged as