Remove #[macro_use] extern crate tracing from rustc_hir_analysis.

This commit is contained in:
Nicholas Nethercote 2024-08-30 09:02:58 +10:00
parent 67556eca99
commit cc16c902f1
32 changed files with 31 additions and 3 deletions

View File

@ -4,6 +4,7 @@
use rustc_span::def_id::{LocalDefId, LOCAL_CRATE};
use rustc_span::Span;
use rustc_trait_selection::traits::ObligationCtxt;
use tracing::{debug, instrument};
use crate::errors::AutoDerefReachedRecursionLimit;
use crate::traits;

View File

@ -27,6 +27,7 @@
use rustc_trait_selection::traits;
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
use rustc_type_ir::fold::TypeFoldable;
use tracing::{debug, instrument};
use {rustc_attr as attr, rustc_hir as hir};
use super::compare_impl_item::{check_type_bounds, compare_impl_method, compare_impl_ty};

View File

@ -28,6 +28,7 @@
use rustc_trait_selection::traits::{
self, FulfillmentError, ObligationCause, ObligationCauseCode, ObligationCtxt, Reveal,
};
use tracing::{debug, instrument};
use super::potentially_plural_count;
use crate::errors::{LifetimesOrBoundsMismatchOnTrait, MethodShouldReturnFuture};

View File

@ -97,6 +97,7 @@
use rustc_trait_selection::error_reporting::traits::suggestions::ReturnsVisitor;
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::traits::ObligationCtxt;
use tracing::debug;
use self::compare_impl_item::collect_return_position_impl_trait_in_trait_tys;
use self::region::region_scope_tree;

View File

@ -18,6 +18,7 @@
use rustc_middle::middle::region::*;
use rustc_middle::ty::TyCtxt;
use rustc_span::source_map;
use tracing::debug;
use super::errs::{maybe_expr_static_mut, maybe_stmt_static_mut};

View File

@ -36,6 +36,7 @@
};
use rustc_type_ir::solve::NoSolution;
use rustc_type_ir::TypeFlags;
use tracing::{debug, instrument};
use {rustc_ast as ast, rustc_hir as hir};
use crate::autoderef::Autoderef;

View File

@ -4,6 +4,7 @@
use rustc_middle::query::Providers;
use rustc_middle::ty::TyCtxt;
use rustc_session::lint;
use tracing::debug;
pub(crate) fn provide(providers: &mut Providers) {
*providers = Providers { check_unused_traits, ..*providers };

View File

@ -23,6 +23,7 @@
ConstParamTyImplementationError, CopyImplementationError, InfringingFieldsReason,
};
use rustc_trait_selection::traits::{self, ObligationCause, ObligationCtxt};
use tracing::debug;
use crate::errors;

View File

@ -10,6 +10,7 @@
use rustc_span::{ErrorGuaranteed, Symbol};
use rustc_trait_selection::traits::{self, SkipLeakCheck};
use smallvec::SmallVec;
use tracing::debug;
pub(crate) fn crate_inherent_impls_overlap_check(
tcx: TyCtxt<'_>,

View File

@ -13,6 +13,7 @@
use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt};
use rustc_session::parse::feature_err;
use rustc_span::{sym, ErrorGuaranteed};
use tracing::debug;
use crate::errors;

View File

@ -14,6 +14,7 @@
use rustc_trait_selection::traits::{
self, IsFirstInputType, OrphanCheckErr, OrphanCheckMode, UncoveredTyParams,
};
use tracing::{debug, instrument};
use crate::errors;

View File

@ -42,6 +42,7 @@
use rustc_trait_selection::error_reporting::traits::suggestions::NextTypeParamName;
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::ObligationCtxt;
use tracing::{debug, instrument};
use crate::check::intrinsic::intrinsic_operation_unsafety;
use crate::errors;

View File

@ -10,6 +10,7 @@
use rustc_session::lint;
use rustc_span::symbol::{kw, Symbol};
use rustc_span::Span;
use tracing::{debug, instrument};
use crate::delegation::inherit_generics_for_delegation_item;
use crate::middle::resolve_bound_vars as rbv;

View File

@ -8,6 +8,7 @@
use rustc_span::def_id::{DefId, LocalDefId};
use rustc_span::Span;
use rustc_type_ir::Upcast;
use tracing::{debug, instrument};
use super::ItemCtxt;
use crate::hir_ty_lowering::{HirTyLowerer, PredicateFilter};

View File

@ -10,6 +10,7 @@
use rustc_middle::{bug, span_bug};
use rustc_span::symbol::Ident;
use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument, trace};
use crate::bounds::Bounds;
use crate::collect::ItemCtxt;

View File

@ -24,6 +24,7 @@
use rustc_span::def_id::{DefId, LocalDefId};
use rustc_span::symbol::{sym, Ident};
use rustc_span::Span;
use tracing::{debug, debug_span, instrument};
use crate::errors;

View File

@ -11,6 +11,7 @@
use rustc_middle::{bug, span_bug};
use rustc_span::symbol::Ident;
use rustc_span::{Span, DUMMY_SP};
use tracing::debug;
use super::{bad_placeholder, ItemCtxt};
use crate::errors::TypeofReservedKeywordUsed;

View File

@ -7,6 +7,7 @@
use rustc_middle::hir::nested_filter;
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
use rustc_span::DUMMY_SP;
use tracing::{debug, instrument, trace};
use crate::errors::{TaitForwardCompat, TaitForwardCompat2, UnconstrainedOpaqueType};

View File

@ -4,6 +4,7 @@
use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_span::Span;
use rustc_type_ir::fold::TypeFoldable;
use tracing::debug;
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub(crate) struct Parameter(pub u32);

View File

@ -5,6 +5,7 @@
use rustc_hir as hir;
use rustc_middle::ty::{self as ty, AssocItems, AssocKind, TyCtxt};
use rustc_span::def_id::DefId;
use tracing::debug;
use GenericArgsInfo::*;
/// Handles the `wrong number of type / lifetime / ... arguments` family of error messages.

View File

@ -13,6 +13,7 @@
use rustc_trait_selection::traits;
use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor};
use smallvec::SmallVec;
use tracing::{debug, instrument};
use crate::bounds::Bounds;
use crate::errors;

View File

@ -11,6 +11,7 @@
use rustc_session::lint::builtin::LATE_BOUND_LIFETIME_ARGUMENTS;
use rustc_span::symbol::{kw, sym};
use smallvec::SmallVec;
use tracing::{debug, instrument};
use super::{HirTyLowerer, IsMethodCall};
use crate::errors::wrong_number_of_generic_args::{GenericArgsInfo, WrongNumberOfGenericArgs};

View File

@ -50,6 +50,7 @@
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::wf::object_region_bounds;
use rustc_trait_selection::traits::{self, ObligationCtxt};
use tracing::{debug, debug_span, instrument};
use crate::bounds::Bounds;
use crate::errors::{AmbiguousLifetimeBound, WildPatTy};

View File

@ -14,6 +14,7 @@
use rustc_trait_selection::error_reporting::traits::report_object_safety_error;
use rustc_trait_selection::traits::{self, hir_ty_lowering_object_safety_violations};
use smallvec::{smallvec, SmallVec};
use tracing::{debug, instrument};
use super::HirTyLowerer;
use crate::bounds::Bounds;

View File

@ -8,6 +8,7 @@
use rustc_middle::ty::{self, TyCtxt};
use rustc_span::def_id::LocalDefId;
use rustc_trait_selection::traits::{self, ObligationCtxt};
use tracing::debug;
use crate::collect::ItemCtxt;

View File

@ -77,6 +77,7 @@
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
use rustc_trait_selection::traits::{self, translate_args_with_cause, wf, ObligationCtxt};
use tracing::{debug, instrument};
use crate::errors::GenericArgsOnOverriddenImpl;
use crate::{constrained_generic_params as cgp, errors};

View File

@ -75,9 +75,6 @@
#![warn(unreachable_pub)]
// tidy-alphabetical-end
#[macro_use]
extern crate tracing;
// These are used by Clippy.
pub mod check;

View File

@ -3,6 +3,7 @@
use rustc_hir::def_id::DefId;
use rustc_middle::ty::{self, GenericArg, GenericArgKind, Ty, TyCtxt};
use rustc_span::Span;
use tracing::debug;
use super::explicit::ExplicitPredicatesMap;
use super::utils::*;

View File

@ -8,6 +8,7 @@
use rustc_hir::def::DefKind;
use rustc_middle::ty::{self, GenericArgKind, GenericArgsRef, Ty, TyCtxt};
use rustc_middle::{bug, span_bug};
use tracing::{debug, instrument};
use super::terms::VarianceTerm::*;
use super::terms::*;

View File

@ -12,6 +12,7 @@
use rustc_middle::ty::{
self, CrateVariancesMap, GenericArgsRef, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable,
};
use tracing::{debug, instrument};
/// Defines the `TermsContext` basically houses an arena where we can
/// allocate terms.

View File

@ -7,6 +7,7 @@
use rustc_hir::def_id::DefIdMap;
use rustc_middle::ty;
use tracing::debug;
use super::constraints::*;
use super::terms::VarianceTerm::*;

View File

@ -15,6 +15,7 @@
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{LocalDefId, LocalDefIdMap};
use rustc_middle::ty::{self, TyCtxt};
use tracing::debug;
use self::VarianceTerm::*;