1
Fork 0

Auto merge of #125434 - nnethercote:rm-more-extern-tracing, r=jackh726

Remove more `#[macro_use] extern crate tracing`

Because explicit importing of macros via use items is nicer (more standard and readable) than implicit importing via `#[macro_use]`. Continuing the work from #124511 and #124914.

r? `@jackh726`
This commit is contained in:
bors 2024-05-23 21:36:54 +00:00
commit 8679004993
194 changed files with 193 additions and 65 deletions

View file

@ -70,6 +70,7 @@ use rustc_target::abi::Abi;
use rustc_trait_selection::infer::{InferCtxtExt, TyCtxtInferExt};
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
use rustc_trait_selection::traits::{self, misc::type_allowed_to_implement_copy};
use tracing::debug;
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::Span;
use rustc_target::abi;
use std::cell::Cell;
use std::iter;
use std::slice;
use tracing::debug;
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_session::lint::{BuiltinLintDiag, Lint};
use rustc_span::BytePos;
use tracing::debug;
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_span::symbol::Ident;
use rustc_span::Span;
use tracing::debug;
macro_rules! lint_callback { ($cx:expr, $f:ident, $($args:expr),*) => ({
$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_span::{sym, Span, Symbol};
use rustc_target::abi::FIRST_VARIANT;
use tracing::{debug, instrument};
use crate::lints::{BuiltinClashingExtern, BuiltinClashingExternSub};
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::symbol::{kw, sym, Symbol};
use rustc_span::Span;
use tracing::debug;
declare_tool_lint! {
/// 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::Session;
use rustc_span::Span;
use std::any::Any;
use std::cell::Cell;
use tracing::debug;
/// Extract the [`LintStore`] from [`Session`].
///

View file

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

View file

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

View file

@ -31,9 +31,9 @@ use rustc_span::{Span, Symbol};
use rustc_target::abi::{Abi, Size, WrappingRange};
use rustc_target::abi::{Integer, TagEncoding, Variants};
use rustc_target::spec::abi::Abi as SpecAbi;
use std::iter;
use std::ops::ControlFlow;
use tracing::debug;
declare_lint! {
/// 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 std::iter;
use std::ops::ControlFlow;
use tracing::instrument;
declare_lint! {
/// The `unused_must_use` lint detects unused result of a type flagged as