Rollup merge of #129767 - nnethercote:rm-extern-crate-tracing-4, r=jieyouxu

Remove `#[macro_use] extern crate tracing`, round 4

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, #124914, and #125434. After this PR no `rustc_*` crates use `#[macro_use] extern crate tracing` except for `rustc_codegen_gcc` which is a special case and I will do separately.

r? ```@jieyouxu```
This commit is contained in:
Matthias Krüger 2024-08-31 14:46:11 +02:00 committed by GitHub
commit 7d025bb63d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
213 changed files with 211 additions and 18 deletions

View File

@ -8,6 +8,7 @@ use rustc_middle::mir::{self, traversal, Body, Local, Location};
use rustc_middle::span_bug;
use rustc_middle::ty::{RegionVid, TyCtxt};
use rustc_mir_dataflow::move_paths::MoveData;
use tracing::debug;
use crate::path_utils::allow_two_phase_borrow;
use crate::place_ext::PlaceExt;

View File

@ -5,6 +5,7 @@ use rustc_index::{IndexSlice, IndexVec};
use rustc_middle::mir::ConstraintCategory;
use rustc_middle::ty::{RegionVid, TyCtxt, VarianceDiagInfo};
use rustc_span::Span;
use tracing::{debug, instrument};
use crate::region_infer::{ConstraintSccs, RegionDefinition, RegionTracker};
use crate::type_check::Locations;

View File

@ -10,6 +10,7 @@ use rustc_middle::ty::{RegionVid, TyCtxt};
use rustc_mir_dataflow::fmt::DebugWithContext;
use rustc_mir_dataflow::impls::{EverInitializedPlaces, MaybeUninitializedPlaces};
use rustc_mir_dataflow::{Analysis, AnalysisDomain, GenKill, Results, ResultsVisitable};
use tracing::debug;
use crate::{places_conflict, BorrowSet, PlaceConflictBias, PlaceExt, RegionInferenceContext};

View File

@ -19,6 +19,7 @@ use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::traits::query::type_op;
use rustc_trait_selection::traits::ObligationCtxt;
use rustc_traits::{type_op_ascribe_user_type_with_span, type_op_prove_predicate_with_cause};
use tracing::{debug, instrument};
use crate::region_infer::values::RegionElement;
use crate::session_diagnostics::{

View File

@ -40,6 +40,7 @@ use rustc_trait_selection::error_reporting::traits::FindExprBySpan;
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{Obligation, ObligationCause, ObligationCtxt};
use tracing::{debug, instrument};
use super::explain_borrow::{BorrowExplanation, LaterUseKind};
use super::{DescribePlaceOpt, RegionName, RegionNameSource, UseSpans};

View File

@ -20,6 +20,7 @@ use rustc_middle::ty::{self, RegionVid, Ty, TyCtxt};
use rustc_span::symbol::{kw, Symbol};
use rustc_span::{sym, DesugaringKind, Span};
use rustc_trait_selection::error_reporting::traits::FindExprBySpan;
use tracing::{debug, instrument};
use super::{find_use, RegionName, UseSpans};
use crate::borrow_set::BorrowData;

View File

@ -27,6 +27,7 @@ use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{
type_known_to_meet_bound_modulo_regions, FulfillmentErrorCode,
};
use tracing::debug;
use super::borrow_set::BorrowData;
use super::MirBorrowckCtxt;

View File

@ -10,6 +10,7 @@ use rustc_middle::ty::{self, Ty};
use rustc_mir_dataflow::move_paths::{LookupResult, MovePathIndex};
use rustc_span::{BytePos, ExpnKind, MacroKind, Span};
use rustc_trait_selection::error_reporting::traits::FindExprBySpan;
use tracing::debug;
use crate::diagnostics::{CapturedMessageOpt, DescribePlaceOpt, UseSpans};
use crate::prefixes::PrefixSet;

View File

@ -20,6 +20,7 @@ use rustc_target::abi::FieldIdx;
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits;
use tracing::debug;
use crate::diagnostics::BorrowedContentSource;
use crate::util::FindAssignments;

View File

@ -10,6 +10,7 @@ use rustc_data_structures::fx::FxIndexSet;
use rustc_errors::Diag;
use rustc_middle::ty::RegionVid;
use smallvec::SmallVec;
use tracing::debug;
use super::{ErrorConstraintInfo, RegionName, RegionNameSource};
use crate::MirBorrowckCtxt;

View File

@ -25,6 +25,7 @@ use rustc_trait_selection::error_reporting::infer::region::unexpected_hidden_reg
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{Obligation, ObligationCtxt};
use tracing::{debug, instrument, trace};
use super::{OutlivesSuggestionBuilder, RegionName, RegionNameSource};
use crate::nll::ConstraintDescription;

View File

@ -14,6 +14,7 @@ use rustc_middle::{bug, span_bug};
use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use tracing::{debug, instrument};
use crate::universal_regions::DefiningTy;
use crate::MirBorrowckCtxt;

View File

@ -3,6 +3,7 @@ use rustc_middle::mir::{Body, Local};
use rustc_middle::ty::{self, RegionVid, TyCtxt};
use rustc_span::symbol::Symbol;
use rustc_span::Span;
use tracing::debug;
use crate::region_infer::RegionInferenceContext;

View File

@ -15,9 +15,6 @@
#![warn(unreachable_pub)]
// tidy-alphabetical-end
#[macro_use]
extern crate tracing;
use std::cell::RefCell;
use std::collections::BTreeMap;
use std::marker::PhantomData;
@ -51,6 +48,7 @@ use rustc_session::lint::builtin::UNUSED_MUT;
use rustc_span::{Span, Symbol};
use rustc_target::abi::FieldIdx;
use smallvec::SmallVec;
use tracing::{debug, instrument};
use self::diagnostics::{AccessKind, IllegalMoveOriginKind, MoveError, RegionName};
use self::location::LocationTable;

View File

@ -1,5 +1,6 @@
use rustc_index::IndexVec;
use rustc_middle::mir::{BasicBlock, Body, Location};
use tracing::debug;
/// Maps between a MIR Location, which identifies a particular
/// statement within a basic block, to a "rich location", which

View File

@ -7,6 +7,7 @@ use rustc_index::{IndexSlice, IndexVec};
use rustc_middle::infer::MemberConstraint;
use rustc_middle::ty::{self, Ty};
use rustc_span::Span;
use tracing::debug;
/// Compactly stores a set of `R0 member of [R1...Rn]` constraints,
/// indexed by the region `R0`.

View File

@ -22,6 +22,7 @@ use rustc_mir_dataflow::points::DenseLocationMap;
use rustc_mir_dataflow::ResultsCursor;
use rustc_session::config::MirIncludeSpans;
use rustc_span::symbol::sym;
use tracing::{debug, instrument};
use crate::borrow_set::BorrowSet;
use crate::consumers::ConsumerOptions;

View File

@ -2,6 +2,7 @@ use rustc_data_structures::graph::dominators::Dominators;
use rustc_middle::mir::{BasicBlock, Body, BorrowKind, Location, Place, PlaceRef, ProjectionElem};
use rustc_middle::ty::TyCtxt;
use rustc_target::abi::FieldIdx;
use tracing::debug;
use crate::borrow_set::{BorrowData, BorrowSet, TwoPhaseActivation};
use crate::{places_conflict, AccessDepth, BorrowIndex};

View File

@ -2,6 +2,7 @@ use rustc_hir as hir;
use rustc_macros::extension;
use rustc_middle::mir::{Body, Mutability, Place, ProjectionElem};
use rustc_middle::ty::{self, TyCtxt};
use tracing::debug;
use crate::borrow_set::LocalsStateAtExit;

View File

@ -59,6 +59,7 @@ use rustc_middle::mir::{
Body, BorrowKind, FakeBorrowKind, MutBorrowKind, Place, PlaceElem, PlaceRef, ProjectionElem,
};
use rustc_middle::ty::{self, TyCtxt};
use tracing::{debug, instrument};
use crate::{AccessDepth, ArtificialField, Deep, Overlap, Shallow};

View File

@ -7,6 +7,7 @@ use rustc_middle::mir::{
TerminatorKind,
};
use rustc_middle::ty::TyCtxt;
use tracing::debug;
use crate::borrow_set::BorrowSet;
use crate::facts::AllFacts;

View File

@ -4,6 +4,7 @@ use rustc_middle::mir::{
Terminator, TerminatorKind,
};
use rustc_middle::ty::TyCtxt;
use tracing::debug;
use crate::borrow_set::BorrowSet;
use crate::facts::AllFacts;

View File

@ -6,6 +6,7 @@
use rustc_middle::mir::{Body, LocalKind, Location, START_BLOCK};
use rustc_middle::ty::TyCtxt;
use rustc_mir_dataflow::move_paths::{InitKind, InitLocation, MoveData};
use tracing::debug;
use crate::borrow_set::BorrowSet;
use crate::facts::{AllFacts, PoloniusRegionVid};

View File

@ -21,6 +21,7 @@ use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
use rustc_middle::ty::{self, RegionVid, Ty, TyCtxt, TypeFoldable, UniverseIndex};
use rustc_mir_dataflow::points::DenseLocationMap;
use rustc_span::Span;
use tracing::{debug, instrument, trace};
use crate::constraints::graph::{self, NormalConstraintGraph, RegionGraph};
use crate::constraints::{ConstraintSccIndex, OutlivesConstraint, OutlivesConstraintSet};

View File

@ -13,6 +13,7 @@ use rustc_middle::ty::{
use rustc_span::Span;
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::traits::ObligationCtxt;
use tracing::{debug, instrument};
use super::RegionInferenceContext;
use crate::session_diagnostics::{LifetimeMismatchOpaqueParam, NonGenericOpaqueTypeParam};

View File

@ -8,6 +8,7 @@ use rustc_index::Idx;
use rustc_middle::mir::{BasicBlock, Location};
use rustc_middle::ty::{self, RegionVid};
use rustc_mir_dataflow::points::{DenseLocationMap, PointIndex};
use tracing::debug;
use crate::BorrowIndex;

View File

@ -4,6 +4,7 @@ use rustc_middle::mir::visit::{MutVisitor, TyContext};
use rustc_middle::mir::{Body, ConstOperand, Location, Promoted};
use rustc_middle::ty::{self, GenericArgsRef, Ty, TyCtxt, TypeFoldable};
use rustc_span::Symbol;
use tracing::{debug, instrument};
use crate::BorrowckInferCtxt;

View File

@ -10,6 +10,7 @@ use rustc_span::Span;
use rustc_trait_selection::traits::query::type_op::custom::CustomTypeOp;
use rustc_trait_selection::traits::query::type_op::{self, TypeOpOutput};
use rustc_trait_selection::traits::ObligationCause;
use tracing::{debug, instrument};
use super::{Locations, NormalizeLocation, TypeChecker};
use crate::diagnostics::ToUniverseInfo;

View File

@ -13,6 +13,7 @@ use rustc_span::Span;
use rustc_trait_selection::traits::query::type_op::custom::CustomTypeOp;
use rustc_trait_selection::traits::query::type_op::{TypeOp, TypeOpOutput};
use rustc_trait_selection::traits::ScrubbedTraitError;
use tracing::{debug, instrument};
use crate::constraints::OutlivesConstraint;
use crate::region_infer::TypeTest;

View File

@ -15,6 +15,7 @@ use rustc_span::{ErrorGuaranteed, Span};
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::solve::deeply_normalize;
use rustc_trait_selection::traits::query::type_op::{self, TypeOp};
use tracing::{debug, instrument};
use type_op::TypeOpOutput;
use crate::type_check::{constraint_conversion, Locations, MirTypeckRegionConstraints};

View File

@ -15,6 +15,7 @@ use rustc_infer::infer::{BoundRegionConversionTime, RegionVariableOrigin};
use rustc_middle::mir::*;
use rustc_middle::ty::{self, Ty};
use rustc_span::Span;
use tracing::{debug, instrument};
use super::{Locations, TypeChecker};
use crate::renumber::RegionCtxt;

View File

@ -11,6 +11,7 @@ use rustc_mir_dataflow::impls::MaybeInitializedPlaces;
use rustc_mir_dataflow::move_paths::MoveData;
use rustc_mir_dataflow::points::DenseLocationMap;
use rustc_mir_dataflow::ResultsCursor;
use tracing::debug;
use super::TypeChecker;
use crate::constraints::OutlivesConstraintSet;

View File

@ -2,6 +2,7 @@ use rustc_middle::mir::visit::{MutatingUseContext, PlaceContext, Visitor};
use rustc_middle::mir::{Body, Local, Location, Place};
use rustc_middle::ty::GenericArg;
use rustc_mir_dataflow::move_paths::{LookupResult, MoveData, MovePathIndex};
use tracing::debug;
use super::TypeChecker;
use crate::def_use::{self, DefUse};

View File

@ -15,6 +15,7 @@ use rustc_mir_dataflow::ResultsCursor;
use rustc_span::DUMMY_SP;
use rustc_trait_selection::traits::query::type_op::outlives::DropckOutlives;
use rustc_trait_selection::traits::query::type_op::{TypeOp, TypeOpOutput};
use tracing::debug;
use crate::location::RichLocation;
use crate::region_infer::values::{self, LiveLoans};

View File

@ -45,6 +45,7 @@ use rustc_trait_selection::traits::query::type_op::custom::{
};
use rustc_trait_selection::traits::query::type_op::{TypeOp, TypeOpOutput};
use rustc_trait_selection::traits::PredicateObligation;
use tracing::{debug, instrument, trace};
use crate::borrow_set::BorrowSet;
use crate::constraints::{OutlivesConstraint, OutlivesConstraintSet};

View File

@ -14,6 +14,7 @@ use rustc_middle::ty::fold::FnMutDelegate;
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
use rustc_span::symbol::sym;
use rustc_span::{Span, Symbol};
use tracing::{debug, instrument};
use crate::constraints::OutlivesConstraint;
use crate::diagnostics::UniverseInfo;

View File

@ -34,6 +34,7 @@ use rustc_middle::ty::{
use rustc_middle::{bug, span_bug};
use rustc_span::symbol::{kw, sym};
use rustc_span::{ErrorGuaranteed, Symbol};
use tracing::{debug, instrument};
use crate::renumber::RegionCtxt;
use crate::BorrowckInferCtxt;

View File

@ -3,6 +3,7 @@ use rustc_middle::mir::visit::{PlaceContext, Visitor};
use rustc_middle::mir::{
Local, Location, Place, Statement, StatementKind, Terminator, TerminatorKind,
};
use tracing::debug;
use crate::MirBorrowckCtxt;

View File

@ -4,6 +4,7 @@ use rustc_session::Limit;
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::error_reporting::InferCtxtErrorExt;
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::outlives_bounds::InferCtxtExt as _;
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::infer::ObligationCauseExt as _;
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::bug;
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_trait_selection::traits::{
};
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_hir::def_id::LocalDefId;
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 @@ use rustc_trait_selection::traits::misc::{
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_middle::ty::{self, TyCtxt};
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::query::Providers;
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_span::def_id::{DefId, LocalDefId};
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_target::spec::abi;
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_middle::ty::{self, TyCtxt};
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_middle::{bug, span_bug};
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::ty::{self, GenericPredicates, ImplTraitInTraitData, Ty, TyCtxt
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_middle::{bug, span_bug};
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::ty::{self, Article, IsSuggestable, Ty, TyCtxt, TypeVisitableEx
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::bug;
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::visit::{TypeSuperVisitable, TypeVisitor};
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_errors::{pluralize, Applicability, Diag, Diagnostic, EmissionGuarantee
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_span::{sym, ErrorGuaranteed, Span, Symbol};
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_middle::ty::{
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_target::spec::abi;
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_span::{ErrorGuaranteed, Span};
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::query::Providers;
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_span::{ErrorGuaranteed, Span};
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 @@ This API is completely unstable and subject to change.
#![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::DefKind;
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 as hir;
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::span_bug;
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_arena::DroplessArena;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{LocalDefId, LocalDefIdMap};
use rustc_middle::ty::{self, TyCtxt};
use tracing::debug;
use self::VarianceTerm::*;

View File

@ -8,6 +8,7 @@ use rustc_span::Span;
use rustc_trait_selection::traits::{
IfExpressionCause, MatchExpressionArmCause, ObligationCause, ObligationCauseCode,
};
use tracing::{debug, instrument};
use crate::coercion::{AsCoercionSite, CoerceMany};
use crate::{Diverges, Expectation, FnCtxt, Needs};

View File

@ -20,6 +20,7 @@ use rustc_target::spec::abi;
use rustc_trait_selection::error_reporting::traits::DefIdOrName;
use rustc_trait_selection::infer::InferCtxtExt as _;
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
use tracing::{debug, instrument, trace};
use super::method::probe::ProbeScope;
use super::method::MethodCallee;

View File

@ -44,6 +44,7 @@ use rustc_span::def_id::LOCAL_CRATE;
use rustc_span::symbol::sym;
use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::infer::InferCtxtExt;
use tracing::{debug, instrument};
use super::FnCtxt;
use crate::{errors, type_error_struct};

View File

@ -12,6 +12,7 @@ use rustc_span::def_id::LocalDefId;
use rustc_span::symbol::sym;
use rustc_target::spec::abi::Abi;
use rustc_trait_selection::traits::{ObligationCause, ObligationCauseCode};
use tracing::{debug, instrument};
use crate::coercion::CoerceMany;
use crate::gather_locals::GatherLocalsVisitor;

View File

@ -19,6 +19,7 @@ use rustc_target::spec::abi::Abi;
use rustc_trait_selection::error_reporting::traits::ArgKind;
use rustc_trait_selection::traits;
use rustc_type_ir::ClosureKind;
use tracing::{debug, instrument, trace};
use super::{check_fn, CoroutineTypes, Expectation, FnCtxt};

View File

@ -66,6 +66,7 @@ use rustc_trait_selection::traits::{
self, NormalizeExt, ObligationCause, ObligationCauseCode, ObligationCtxt,
};
use smallvec::{smallvec, SmallVec};
use tracing::{debug, instrument};
use crate::errors::SuggestBoxingForReturnImplTrait;
use crate::FnCtxt;

View File

@ -13,6 +13,7 @@ use rustc_span::symbol::sym;
use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::ObligationCause;
use tracing::instrument;
use super::method::probe;
use crate::FnCtxt;

View File

@ -34,6 +34,7 @@ use rustc_target::abi::{FieldIdx, FIRST_VARIANT};
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{self, ObligationCauseCode, ObligationCtxt};
use smallvec::SmallVec;
use tracing::{debug, instrument, trace};
use {rustc_ast as ast, rustc_hir as hir};
use crate::coercion::{CoerceMany, DynamicCoerceMany};

View File

@ -26,6 +26,7 @@ use rustc_middle::{bug, span_bug};
use rustc_span::{ErrorGuaranteed, Span};
use rustc_target::abi::{FieldIdx, VariantIdx, FIRST_VARIANT};
use rustc_trait_selection::infer::InferCtxtExt;
use tracing::{debug, trace};
use ty::BorrowKind::ImmBorrow;
use crate::fn_ctxt::FnCtxt;

View File

@ -14,6 +14,7 @@ use rustc_session::lint;
use rustc_span::def_id::LocalDefId;
use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::traits::{ObligationCause, ObligationCtxt};
use tracing::debug;
use crate::{errors, FnCtxt, TypeckRootCtxt};

View File

@ -38,6 +38,7 @@ use rustc_trait_selection::error_reporting::infer::need_type_info::TypeAnnotatio
use rustc_trait_selection::traits::{
self, NormalizeExt, ObligationCauseCode, ObligationCtxt, StructurallyNormalizeExt,
};
use tracing::{debug, instrument};
use crate::callee::{self, DeferredCallResolution};
use crate::errors::{self, CtorIsPrivate};

View File

@ -26,6 +26,7 @@ use rustc_span::{sym, Span, DUMMY_SP};
use rustc_trait_selection::error_reporting::infer::{FailureCode, ObligationCauseExt};
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{self, ObligationCauseCode, SelectionContext};
use tracing::debug;
use {rustc_ast as ast, rustc_hir as hir};
use crate::coercion::CoerceMany;

View File

@ -7,6 +7,7 @@ use rustc_span::Span;
use rustc_trait_selection::solve::inspect::{
InspectConfig, InspectGoal, ProofTreeInferCtxtExt, ProofTreeVisitor,
};
use tracing::{debug, instrument, trace};
use crate::FnCtxt;

View File

@ -31,6 +31,7 @@ use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits;
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
use tracing::{debug, instrument};
use super::FnCtxt;
use crate::fn_ctxt::rustc_span::BytePos;

View File

@ -5,6 +5,7 @@ use rustc_infer::traits::ObligationCauseCode;
use rustc_middle::ty::{Ty, UserType};
use rustc_span::def_id::LocalDefId;
use rustc_span::Span;
use tracing::debug;
use crate::FnCtxt;

View File

@ -7,6 +7,7 @@ use rustc_middle::bug;
use rustc_middle::ty::layout::{LayoutError, SizeSkeleton};
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
use rustc_target::abi::{Pointer, VariantIdx};
use tracing::trace;
use super::FnCtxt;

View File

@ -11,9 +11,6 @@
#![warn(unreachable_pub)]
// tidy-alphabetical-end
#[macro_use]
extern crate tracing;
mod _match;
mod autoderef;
mod callee;
@ -60,6 +57,7 @@ use rustc_middle::{bug, span_bug};
use rustc_session::config;
use rustc_span::def_id::LocalDefId;
use rustc_span::Span;
use tracing::{debug, instrument};
use typeck_root_ctxt::TypeckRootCtxt;
use crate::check::check_fn;

View File

@ -22,6 +22,7 @@ use rustc_middle::ty::{
use rustc_middle::{bug, span_bug};
use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::traits;
use tracing::debug;
use super::{probe, MethodCallee};
use crate::{callee, FnCtxt};

View File

@ -22,6 +22,7 @@ use rustc_span::symbol::Ident;
use rustc_span::Span;
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
use rustc_trait_selection::traits::{self, NormalizeExt};
use tracing::{debug, instrument};
use self::probe::{IsSuggestion, ProbeScope};
pub(crate) use self::MethodError::*;

View File

@ -12,6 +12,7 @@ use rustc_span::symbol::kw::{Empty, Underscore};
use rustc_span::symbol::{sym, Ident};
use rustc_span::Span;
use rustc_trait_selection::infer::InferCtxtExt;
use tracing::debug;
use crate::method::probe::{self, Pick};
use crate::FnCtxt;

View File

@ -36,6 +36,7 @@ use rustc_trait_selection::traits::query::method_autoderef::{
use rustc_trait_selection::traits::query::CanonicalTyGoal;
use rustc_trait_selection::traits::{self, ObligationCause, ObligationCtxt};
use smallvec::{smallvec, SmallVec};
use tracing::{debug, instrument};
use self::CandidateKind::*;
pub(crate) use self::PickKind::*;

View File

@ -37,6 +37,7 @@ use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _
use rustc_trait_selection::traits::{
supertraits, FulfillmentError, Obligation, ObligationCause, ObligationCauseCode,
};
use tracing::{debug, info, instrument};
use super::probe::{AutorefOrPtrAdjustment, IsSuggestion, Mode, ProbeScope};
use super::{CandidateSource, MethodError, NoMatchData};

View File

@ -17,6 +17,7 @@ use rustc_span::Span;
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{FulfillmentError, ObligationCtxt};
use rustc_type_ir::TyKind::*;
use tracing::debug;
use {rustc_ast as ast, rustc_hir as hir};
use super::method::MethodCallee;

View File

@ -24,6 +24,7 @@ use rustc_span::{BytePos, Span, DUMMY_SP};
use rustc_target::abi::FieldIdx;
use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{ObligationCause, ObligationCauseCode};
use tracing::{debug, instrument, trace};
use ty::VariantDef;
use super::report_unexpected_variant_res;

View File

@ -9,6 +9,7 @@ use rustc_middle::ty::adjustment::{
use rustc_middle::ty::{self, Ty};
use rustc_span::symbol::{sym, Ident};
use rustc_span::Span;
use tracing::debug;
use {rustc_ast as ast, rustc_hir as hir};
use crate::method::MethodCallee;

View File

@ -4,6 +4,7 @@ use rustc_hir as hir;
use rustc_middle::bug;
use rustc_middle::middle::region::{RvalueCandidateType, Scope, ScopeTree};
use rustc_middle::ty::RvalueScopes;
use tracing::debug;
use super::FnCtxt;

View File

@ -15,6 +15,7 @@ use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
use rustc_trait_selection::traits::{
self, FulfillmentError, PredicateObligation, TraitEngine, TraitEngineExt as _,
};
use tracing::{debug, instrument};
use super::callee::DeferredCallResolution;

View File

@ -52,6 +52,7 @@ use rustc_session::lint;
use rustc_span::{sym, BytePos, Pos, Span, Symbol};
use rustc_target::abi::FIRST_VARIANT;
use rustc_trait_selection::infer::InferCtxtExt;
use tracing::{debug, instrument};
use super::FnCtxt;
use crate::expr_use_visitor as euv;

View File

@ -19,6 +19,7 @@ use rustc_span::symbol::sym;
use rustc_span::Span;
use rustc_trait_selection::error_reporting::infer::need_type_info::TypeAnnotationNeeded;
use rustc_trait_selection::solve;
use tracing::{debug, instrument};
use crate::FnCtxt;

View File

@ -13,6 +13,7 @@ use rustc_middle::ty::{
self, BoundVar, GenericArg, InferConst, List, Ty, TyCtxt, TypeFlags, TypeVisitableExt,
};
use smallvec::SmallVec;
use tracing::debug;
use crate::infer::canonical::{
Canonical, CanonicalTyVarKind, CanonicalVarInfo, CanonicalVarKind, OriginalQueryValues,

Some files were not shown because too many files have changed in this diff Show More