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::span_bug;
use rustc_middle::ty::{RegionVid, TyCtxt}; use rustc_middle::ty::{RegionVid, TyCtxt};
use rustc_mir_dataflow::move_paths::MoveData; use rustc_mir_dataflow::move_paths::MoveData;
use tracing::debug;
use crate::path_utils::allow_two_phase_borrow; use crate::path_utils::allow_two_phase_borrow;
use crate::place_ext::PlaceExt; use crate::place_ext::PlaceExt;

View file

@ -5,6 +5,7 @@ use rustc_index::{IndexSlice, IndexVec};
use rustc_middle::mir::ConstraintCategory; use rustc_middle::mir::ConstraintCategory;
use rustc_middle::ty::{RegionVid, TyCtxt, VarianceDiagInfo}; use rustc_middle::ty::{RegionVid, TyCtxt, VarianceDiagInfo};
use rustc_span::Span; use rustc_span::Span;
use tracing::{debug, instrument};
use crate::region_infer::{ConstraintSccs, RegionDefinition, RegionTracker}; use crate::region_infer::{ConstraintSccs, RegionDefinition, RegionTracker};
use crate::type_check::Locations; 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::fmt::DebugWithContext;
use rustc_mir_dataflow::impls::{EverInitializedPlaces, MaybeUninitializedPlaces}; use rustc_mir_dataflow::impls::{EverInitializedPlaces, MaybeUninitializedPlaces};
use rustc_mir_dataflow::{Analysis, AnalysisDomain, GenKill, Results, ResultsVisitable}; use rustc_mir_dataflow::{Analysis, AnalysisDomain, GenKill, Results, ResultsVisitable};
use tracing::debug;
use crate::{places_conflict, BorrowSet, PlaceConflictBias, PlaceExt, RegionInferenceContext}; 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::query::type_op;
use rustc_trait_selection::traits::ObligationCtxt; use rustc_trait_selection::traits::ObligationCtxt;
use rustc_traits::{type_op_ascribe_user_type_with_span, type_op_prove_predicate_with_cause}; 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::region_infer::values::RegionElement;
use crate::session_diagnostics::{ 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::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{Obligation, ObligationCause, ObligationCtxt}; use rustc_trait_selection::traits::{Obligation, ObligationCause, ObligationCtxt};
use tracing::{debug, instrument};
use super::explain_borrow::{BorrowExplanation, LaterUseKind}; use super::explain_borrow::{BorrowExplanation, LaterUseKind};
use super::{DescribePlaceOpt, RegionName, RegionNameSource, UseSpans}; 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::symbol::{kw, Symbol};
use rustc_span::{sym, DesugaringKind, Span}; use rustc_span::{sym, DesugaringKind, Span};
use rustc_trait_selection::error_reporting::traits::FindExprBySpan; use rustc_trait_selection::error_reporting::traits::FindExprBySpan;
use tracing::{debug, instrument};
use super::{find_use, RegionName, UseSpans}; use super::{find_use, RegionName, UseSpans};
use crate::borrow_set::BorrowData; use crate::borrow_set::BorrowData;

View file

@ -27,6 +27,7 @@ use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{ use rustc_trait_selection::traits::{
type_known_to_meet_bound_modulo_regions, FulfillmentErrorCode, type_known_to_meet_bound_modulo_regions, FulfillmentErrorCode,
}; };
use tracing::debug;
use super::borrow_set::BorrowData; use super::borrow_set::BorrowData;
use super::MirBorrowckCtxt; 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_mir_dataflow::move_paths::{LookupResult, MovePathIndex};
use rustc_span::{BytePos, ExpnKind, MacroKind, Span}; use rustc_span::{BytePos, ExpnKind, MacroKind, Span};
use rustc_trait_selection::error_reporting::traits::FindExprBySpan; use rustc_trait_selection::error_reporting::traits::FindExprBySpan;
use tracing::debug;
use crate::diagnostics::{CapturedMessageOpt, DescribePlaceOpt, UseSpans}; use crate::diagnostics::{CapturedMessageOpt, DescribePlaceOpt, UseSpans};
use crate::prefixes::PrefixSet; 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::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits; use rustc_trait_selection::traits;
use tracing::debug;
use crate::diagnostics::BorrowedContentSource; use crate::diagnostics::BorrowedContentSource;
use crate::util::FindAssignments; use crate::util::FindAssignments;

View file

@ -10,6 +10,7 @@ use rustc_data_structures::fx::FxIndexSet;
use rustc_errors::Diag; use rustc_errors::Diag;
use rustc_middle::ty::RegionVid; use rustc_middle::ty::RegionVid;
use smallvec::SmallVec; use smallvec::SmallVec;
use tracing::debug;
use super::{ErrorConstraintInfo, RegionName, RegionNameSource}; use super::{ErrorConstraintInfo, RegionName, RegionNameSource};
use crate::MirBorrowckCtxt; 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::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{Obligation, ObligationCtxt}; use rustc_trait_selection::traits::{Obligation, ObligationCtxt};
use tracing::{debug, instrument, trace};
use super::{OutlivesSuggestionBuilder, RegionName, RegionNameSource}; use super::{OutlivesSuggestionBuilder, RegionName, RegionNameSource};
use crate::nll::ConstraintDescription; 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::symbol::{kw, sym, Symbol};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::error_reporting::InferCtxtErrorExt; use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use tracing::{debug, instrument};
use crate::universal_regions::DefiningTy; use crate::universal_regions::DefiningTy;
use crate::MirBorrowckCtxt; use crate::MirBorrowckCtxt;

View file

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

View file

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

View file

@ -1,5 +1,6 @@
use rustc_index::IndexVec; use rustc_index::IndexVec;
use rustc_middle::mir::{BasicBlock, Body, Location}; use rustc_middle::mir::{BasicBlock, Body, Location};
use tracing::debug;
/// Maps between a MIR Location, which identifies a particular /// Maps between a MIR Location, which identifies a particular
/// statement within a basic block, to a "rich location", which /// 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::infer::MemberConstraint;
use rustc_middle::ty::{self, Ty}; use rustc_middle::ty::{self, Ty};
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
/// Compactly stores a set of `R0 member of [R1...Rn]` constraints, /// Compactly stores a set of `R0 member of [R1...Rn]` constraints,
/// indexed by the region `R0`. /// indexed by the region `R0`.

View file

@ -22,6 +22,7 @@ use rustc_mir_dataflow::points::DenseLocationMap;
use rustc_mir_dataflow::ResultsCursor; use rustc_mir_dataflow::ResultsCursor;
use rustc_session::config::MirIncludeSpans; use rustc_session::config::MirIncludeSpans;
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use tracing::{debug, instrument};
use crate::borrow_set::BorrowSet; use crate::borrow_set::BorrowSet;
use crate::consumers::ConsumerOptions; 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::mir::{BasicBlock, Body, BorrowKind, Location, Place, PlaceRef, ProjectionElem};
use rustc_middle::ty::TyCtxt; use rustc_middle::ty::TyCtxt;
use rustc_target::abi::FieldIdx; use rustc_target::abi::FieldIdx;
use tracing::debug;
use crate::borrow_set::{BorrowData, BorrowSet, TwoPhaseActivation}; use crate::borrow_set::{BorrowData, BorrowSet, TwoPhaseActivation};
use crate::{places_conflict, AccessDepth, BorrowIndex}; use crate::{places_conflict, AccessDepth, BorrowIndex};

View file

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

View file

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

View file

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

View file

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

View file

@ -6,6 +6,7 @@
use rustc_middle::mir::{Body, LocalKind, Location, START_BLOCK}; use rustc_middle::mir::{Body, LocalKind, Location, START_BLOCK};
use rustc_middle::ty::TyCtxt; use rustc_middle::ty::TyCtxt;
use rustc_mir_dataflow::move_paths::{InitKind, InitLocation, MoveData}; use rustc_mir_dataflow::move_paths::{InitKind, InitLocation, MoveData};
use tracing::debug;
use crate::borrow_set::BorrowSet; use crate::borrow_set::BorrowSet;
use crate::facts::{AllFacts, PoloniusRegionVid}; 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_middle::ty::{self, RegionVid, Ty, TyCtxt, TypeFoldable, UniverseIndex};
use rustc_mir_dataflow::points::DenseLocationMap; use rustc_mir_dataflow::points::DenseLocationMap;
use rustc_span::Span; use rustc_span::Span;
use tracing::{debug, instrument, trace};
use crate::constraints::graph::{self, NormalConstraintGraph, RegionGraph}; use crate::constraints::graph::{self, NormalConstraintGraph, RegionGraph};
use crate::constraints::{ConstraintSccIndex, OutlivesConstraint, OutlivesConstraintSet}; use crate::constraints::{ConstraintSccIndex, OutlivesConstraint, OutlivesConstraintSet};

View file

@ -13,6 +13,7 @@ use rustc_middle::ty::{
use rustc_span::Span; use rustc_span::Span;
use rustc_trait_selection::error_reporting::InferCtxtErrorExt; use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::traits::ObligationCtxt; use rustc_trait_selection::traits::ObligationCtxt;
use tracing::{debug, instrument};
use super::RegionInferenceContext; use super::RegionInferenceContext;
use crate::session_diagnostics::{LifetimeMismatchOpaqueParam, NonGenericOpaqueTypeParam}; 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::mir::{BasicBlock, Location};
use rustc_middle::ty::{self, RegionVid}; use rustc_middle::ty::{self, RegionVid};
use rustc_mir_dataflow::points::{DenseLocationMap, PointIndex}; use rustc_mir_dataflow::points::{DenseLocationMap, PointIndex};
use tracing::debug;
use crate::BorrowIndex; 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::mir::{Body, ConstOperand, Location, Promoted};
use rustc_middle::ty::{self, GenericArgsRef, Ty, TyCtxt, TypeFoldable}; use rustc_middle::ty::{self, GenericArgsRef, Ty, TyCtxt, TypeFoldable};
use rustc_span::Symbol; use rustc_span::Symbol;
use tracing::{debug, instrument};
use crate::BorrowckInferCtxt; 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::custom::CustomTypeOp;
use rustc_trait_selection::traits::query::type_op::{self, TypeOpOutput}; use rustc_trait_selection::traits::query::type_op::{self, TypeOpOutput};
use rustc_trait_selection::traits::ObligationCause; use rustc_trait_selection::traits::ObligationCause;
use tracing::{debug, instrument};
use super::{Locations, NormalizeLocation, TypeChecker}; use super::{Locations, NormalizeLocation, TypeChecker};
use crate::diagnostics::ToUniverseInfo; 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::custom::CustomTypeOp;
use rustc_trait_selection::traits::query::type_op::{TypeOp, TypeOpOutput}; use rustc_trait_selection::traits::query::type_op::{TypeOp, TypeOpOutput};
use rustc_trait_selection::traits::ScrubbedTraitError; use rustc_trait_selection::traits::ScrubbedTraitError;
use tracing::{debug, instrument};
use crate::constraints::OutlivesConstraint; use crate::constraints::OutlivesConstraint;
use crate::region_infer::TypeTest; 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::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::solve::deeply_normalize; use rustc_trait_selection::solve::deeply_normalize;
use rustc_trait_selection::traits::query::type_op::{self, TypeOp}; use rustc_trait_selection::traits::query::type_op::{self, TypeOp};
use tracing::{debug, instrument};
use type_op::TypeOpOutput; use type_op::TypeOpOutput;
use crate::type_check::{constraint_conversion, Locations, MirTypeckRegionConstraints}; 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::mir::*;
use rustc_middle::ty::{self, Ty}; use rustc_middle::ty::{self, Ty};
use rustc_span::Span; use rustc_span::Span;
use tracing::{debug, instrument};
use super::{Locations, TypeChecker}; use super::{Locations, TypeChecker};
use crate::renumber::RegionCtxt; 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::move_paths::MoveData;
use rustc_mir_dataflow::points::DenseLocationMap; use rustc_mir_dataflow::points::DenseLocationMap;
use rustc_mir_dataflow::ResultsCursor; use rustc_mir_dataflow::ResultsCursor;
use tracing::debug;
use super::TypeChecker; use super::TypeChecker;
use crate::constraints::OutlivesConstraintSet; 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::mir::{Body, Local, Location, Place};
use rustc_middle::ty::GenericArg; use rustc_middle::ty::GenericArg;
use rustc_mir_dataflow::move_paths::{LookupResult, MoveData, MovePathIndex}; use rustc_mir_dataflow::move_paths::{LookupResult, MoveData, MovePathIndex};
use tracing::debug;
use super::TypeChecker; use super::TypeChecker;
use crate::def_use::{self, DefUse}; use crate::def_use::{self, DefUse};

View file

@ -15,6 +15,7 @@ use rustc_mir_dataflow::ResultsCursor;
use rustc_span::DUMMY_SP; use rustc_span::DUMMY_SP;
use rustc_trait_selection::traits::query::type_op::outlives::DropckOutlives; use rustc_trait_selection::traits::query::type_op::outlives::DropckOutlives;
use rustc_trait_selection::traits::query::type_op::{TypeOp, TypeOpOutput}; use rustc_trait_selection::traits::query::type_op::{TypeOp, TypeOpOutput};
use tracing::debug;
use crate::location::RichLocation; use crate::location::RichLocation;
use crate::region_infer::values::{self, LiveLoans}; 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::query::type_op::{TypeOp, TypeOpOutput};
use rustc_trait_selection::traits::PredicateObligation; use rustc_trait_selection::traits::PredicateObligation;
use tracing::{debug, instrument, trace};
use crate::borrow_set::BorrowSet; use crate::borrow_set::BorrowSet;
use crate::constraints::{OutlivesConstraint, OutlivesConstraintSet}; 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_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use rustc_span::{Span, Symbol}; use rustc_span::{Span, Symbol};
use tracing::{debug, instrument};
use crate::constraints::OutlivesConstraint; use crate::constraints::OutlivesConstraint;
use crate::diagnostics::UniverseInfo; use crate::diagnostics::UniverseInfo;

View file

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

View file

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

View file

@ -4,6 +4,7 @@ use rustc_session::Limit;
use rustc_span::def_id::{LocalDefId, LOCAL_CRATE}; use rustc_span::def_id::{LocalDefId, LOCAL_CRATE};
use rustc_span::Span; use rustc_span::Span;
use rustc_trait_selection::traits::ObligationCtxt; use rustc_trait_selection::traits::ObligationCtxt;
use tracing::{debug, instrument};
use crate::errors::AutoDerefReachedRecursionLimit; use crate::errors::AutoDerefReachedRecursionLimit;
use crate::traits; 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;
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _; use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
use rustc_type_ir::fold::TypeFoldable; use rustc_type_ir::fold::TypeFoldable;
use tracing::{debug, instrument};
use {rustc_attr as attr, rustc_hir as hir}; use {rustc_attr as attr, rustc_hir as hir};
use super::compare_impl_item::{check_type_bounds, compare_impl_method, compare_impl_ty}; 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::{ use rustc_trait_selection::traits::{
self, FulfillmentError, ObligationCause, ObligationCauseCode, ObligationCtxt, Reveal, self, FulfillmentError, ObligationCause, ObligationCauseCode, ObligationCtxt, Reveal,
}; };
use tracing::{debug, instrument};
use super::potentially_plural_count; use super::potentially_plural_count;
use crate::errors::{LifetimesOrBoundsMismatchOnTrait, MethodShouldReturnFuture}; 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::traits::suggestions::ReturnsVisitor;
use rustc_trait_selection::error_reporting::InferCtxtErrorExt; use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::traits::ObligationCtxt; use rustc_trait_selection::traits::ObligationCtxt;
use tracing::debug;
use self::compare_impl_item::collect_return_position_impl_trait_in_trait_tys; use self::compare_impl_item::collect_return_position_impl_trait_in_trait_tys;
use self::region::region_scope_tree; use self::region::region_scope_tree;

View file

@ -18,6 +18,7 @@ use rustc_middle::bug;
use rustc_middle::middle::region::*; use rustc_middle::middle::region::*;
use rustc_middle::ty::TyCtxt; use rustc_middle::ty::TyCtxt;
use rustc_span::source_map; use rustc_span::source_map;
use tracing::debug;
use super::errs::{maybe_expr_static_mut, maybe_stmt_static_mut}; 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::solve::NoSolution;
use rustc_type_ir::TypeFlags; use rustc_type_ir::TypeFlags;
use tracing::{debug, instrument};
use {rustc_ast as ast, rustc_hir as hir}; use {rustc_ast as ast, rustc_hir as hir};
use crate::autoderef::Autoderef; use crate::autoderef::Autoderef;

View file

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

View file

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

View file

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

View file

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

View file

@ -14,6 +14,7 @@ use rustc_span::def_id::{DefId, LocalDefId};
use rustc_trait_selection::traits::{ use rustc_trait_selection::traits::{
self, IsFirstInputType, OrphanCheckErr, OrphanCheckMode, UncoveredTyParams, self, IsFirstInputType, OrphanCheckErr, OrphanCheckMode, UncoveredTyParams,
}; };
use tracing::{debug, instrument};
use crate::errors; 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::error_reporting::traits::suggestions::NextTypeParamName;
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::ObligationCtxt; use rustc_trait_selection::traits::ObligationCtxt;
use tracing::{debug, instrument};
use crate::check::intrinsic::intrinsic_operation_unsafety; use crate::check::intrinsic::intrinsic_operation_unsafety;
use crate::errors; use crate::errors;

View file

@ -10,6 +10,7 @@ use rustc_middle::ty::{self, TyCtxt};
use rustc_session::lint; use rustc_session::lint;
use rustc_span::symbol::{kw, Symbol}; use rustc_span::symbol::{kw, Symbol};
use rustc_span::Span; use rustc_span::Span;
use tracing::{debug, instrument};
use crate::delegation::inherit_generics_for_delegation_item; use crate::delegation::inherit_generics_for_delegation_item;
use crate::middle::resolve_bound_vars as rbv; 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::def_id::{DefId, LocalDefId};
use rustc_span::Span; use rustc_span::Span;
use rustc_type_ir::Upcast; use rustc_type_ir::Upcast;
use tracing::{debug, instrument};
use super::ItemCtxt; use super::ItemCtxt;
use crate::hir_ty_lowering::{HirTyLowerer, PredicateFilter}; 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_middle::{bug, span_bug};
use rustc_span::symbol::Ident; use rustc_span::symbol::Ident;
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument, trace};
use crate::bounds::Bounds; use crate::bounds::Bounds;
use crate::collect::ItemCtxt; 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::def_id::{DefId, LocalDefId};
use rustc_span::symbol::{sym, Ident}; use rustc_span::symbol::{sym, Ident};
use rustc_span::Span; use rustc_span::Span;
use tracing::{debug, debug_span, instrument};
use crate::errors; 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_middle::{bug, span_bug};
use rustc_span::symbol::Ident; use rustc_span::symbol::Ident;
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::debug;
use super::{bad_placeholder, ItemCtxt}; use super::{bad_placeholder, ItemCtxt};
use crate::errors::TypeofReservedKeywordUsed; use crate::errors::TypeofReservedKeywordUsed;

View file

@ -7,6 +7,7 @@ use rustc_middle::bug;
use rustc_middle::hir::nested_filter; use rustc_middle::hir::nested_filter;
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt}; use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
use rustc_span::DUMMY_SP; use rustc_span::DUMMY_SP;
use tracing::{debug, instrument, trace};
use crate::errors::{TaitForwardCompat, TaitForwardCompat2, UnconstrainedOpaqueType}; 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_middle::ty::{self, Ty, TyCtxt};
use rustc_span::Span; use rustc_span::Span;
use rustc_type_ir::fold::TypeFoldable; use rustc_type_ir::fold::TypeFoldable;
use tracing::debug;
#[derive(Clone, PartialEq, Eq, Hash, Debug)] #[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub(crate) struct Parameter(pub u32); 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_hir as hir;
use rustc_middle::ty::{self as ty, AssocItems, AssocKind, TyCtxt}; use rustc_middle::ty::{self as ty, AssocItems, AssocKind, TyCtxt};
use rustc_span::def_id::DefId; use rustc_span::def_id::DefId;
use tracing::debug;
use GenericArgsInfo::*; use GenericArgsInfo::*;
/// Handles the `wrong number of type / lifetime / ... arguments` family of error messages. /// 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_trait_selection::traits;
use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor}; use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor};
use smallvec::SmallVec; use smallvec::SmallVec;
use tracing::{debug, instrument};
use crate::bounds::Bounds; use crate::bounds::Bounds;
use crate::errors; use crate::errors;

View file

@ -11,6 +11,7 @@ use rustc_middle::ty::{
use rustc_session::lint::builtin::LATE_BOUND_LIFETIME_ARGUMENTS; use rustc_session::lint::builtin::LATE_BOUND_LIFETIME_ARGUMENTS;
use rustc_span::symbol::{kw, sym}; use rustc_span::symbol::{kw, sym};
use smallvec::SmallVec; use smallvec::SmallVec;
use tracing::{debug, instrument};
use super::{HirTyLowerer, IsMethodCall}; use super::{HirTyLowerer, IsMethodCall};
use crate::errors::wrong_number_of_generic_args::{GenericArgsInfo, WrongNumberOfGenericArgs}; 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::infer::InferCtxtExt;
use rustc_trait_selection::traits::wf::object_region_bounds; use rustc_trait_selection::traits::wf::object_region_bounds;
use rustc_trait_selection::traits::{self, ObligationCtxt}; use rustc_trait_selection::traits::{self, ObligationCtxt};
use tracing::{debug, debug_span, instrument};
use crate::bounds::Bounds; use crate::bounds::Bounds;
use crate::errors::{AmbiguousLifetimeBound, WildPatTy}; 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::error_reporting::traits::report_object_safety_error;
use rustc_trait_selection::traits::{self, hir_ty_lowering_object_safety_violations}; use rustc_trait_selection::traits::{self, hir_ty_lowering_object_safety_violations};
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
use tracing::{debug, instrument};
use super::HirTyLowerer; use super::HirTyLowerer;
use crate::bounds::Bounds; use crate::bounds::Bounds;

View file

@ -8,6 +8,7 @@ use rustc_middle::query::Providers;
use rustc_middle::ty::{self, TyCtxt}; use rustc_middle::ty::{self, TyCtxt};
use rustc_span::def_id::LocalDefId; use rustc_span::def_id::LocalDefId;
use rustc_trait_selection::traits::{self, ObligationCtxt}; use rustc_trait_selection::traits::{self, ObligationCtxt};
use tracing::debug;
use crate::collect::ItemCtxt; 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::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _; use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
use rustc_trait_selection::traits::{self, translate_args_with_cause, wf, ObligationCtxt}; use rustc_trait_selection::traits::{self, translate_args_with_cause, wf, ObligationCtxt};
use tracing::{debug, instrument};
use crate::errors::GenericArgsOnOverriddenImpl; use crate::errors::GenericArgsOnOverriddenImpl;
use crate::{constrained_generic_params as cgp, errors}; 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)] #![warn(unreachable_pub)]
// tidy-alphabetical-end // tidy-alphabetical-end
#[macro_use]
extern crate tracing;
// These are used by Clippy. // These are used by Clippy.
pub mod check; pub mod check;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -8,6 +8,7 @@ use rustc_span::Span;
use rustc_trait_selection::traits::{ use rustc_trait_selection::traits::{
IfExpressionCause, MatchExpressionArmCause, ObligationCause, ObligationCauseCode, IfExpressionCause, MatchExpressionArmCause, ObligationCause, ObligationCauseCode,
}; };
use tracing::{debug, instrument};
use crate::coercion::{AsCoercionSite, CoerceMany}; use crate::coercion::{AsCoercionSite, CoerceMany};
use crate::{Diverges, Expectation, FnCtxt, Needs}; 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::error_reporting::traits::DefIdOrName;
use rustc_trait_selection::infer::InferCtxtExt as _; use rustc_trait_selection::infer::InferCtxtExt as _;
use rustc_trait_selection::traits::query::evaluate_obligation::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::probe::ProbeScope;
use super::method::MethodCallee; 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::symbol::sym;
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use tracing::{debug, instrument};
use super::FnCtxt; use super::FnCtxt;
use crate::{errors, type_error_struct}; 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_span::symbol::sym;
use rustc_target::spec::abi::Abi; use rustc_target::spec::abi::Abi;
use rustc_trait_selection::traits::{ObligationCause, ObligationCauseCode}; use rustc_trait_selection::traits::{ObligationCause, ObligationCauseCode};
use tracing::{debug, instrument};
use crate::coercion::CoerceMany; use crate::coercion::CoerceMany;
use crate::gather_locals::GatherLocalsVisitor; 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::error_reporting::traits::ArgKind;
use rustc_trait_selection::traits; use rustc_trait_selection::traits;
use rustc_type_ir::ClosureKind; use rustc_type_ir::ClosureKind;
use tracing::{debug, instrument, trace};
use super::{check_fn, CoroutineTypes, Expectation, FnCtxt}; use super::{check_fn, CoroutineTypes, Expectation, FnCtxt};

View file

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

View file

@ -13,6 +13,7 @@ use rustc_span::symbol::sym;
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::ObligationCause; use rustc_trait_selection::traits::ObligationCause;
use tracing::instrument;
use super::method::probe; use super::method::probe;
use crate::FnCtxt; 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::infer::InferCtxtExt;
use rustc_trait_selection::traits::{self, ObligationCauseCode, ObligationCtxt}; use rustc_trait_selection::traits::{self, ObligationCauseCode, ObligationCtxt};
use smallvec::SmallVec; use smallvec::SmallVec;
use tracing::{debug, instrument, trace};
use {rustc_ast as ast, rustc_hir as hir}; use {rustc_ast as ast, rustc_hir as hir};
use crate::coercion::{CoerceMany, DynamicCoerceMany}; use crate::coercion::{CoerceMany, DynamicCoerceMany};

View file

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

View file

@ -14,6 +14,7 @@ use rustc_session::lint;
use rustc_span::def_id::LocalDefId; use rustc_span::def_id::LocalDefId;
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_trait_selection::traits::{ObligationCause, ObligationCtxt}; use rustc_trait_selection::traits::{ObligationCause, ObligationCtxt};
use tracing::debug;
use crate::{errors, FnCtxt, TypeckRootCtxt}; 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::{ use rustc_trait_selection::traits::{
self, NormalizeExt, ObligationCauseCode, ObligationCtxt, StructurallyNormalizeExt, self, NormalizeExt, ObligationCauseCode, ObligationCtxt, StructurallyNormalizeExt,
}; };
use tracing::{debug, instrument};
use crate::callee::{self, DeferredCallResolution}; use crate::callee::{self, DeferredCallResolution};
use crate::errors::{self, CtorIsPrivate}; 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::error_reporting::infer::{FailureCode, ObligationCauseExt};
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{self, ObligationCauseCode, SelectionContext}; use rustc_trait_selection::traits::{self, ObligationCauseCode, SelectionContext};
use tracing::debug;
use {rustc_ast as ast, rustc_hir as hir}; use {rustc_ast as ast, rustc_hir as hir};
use crate::coercion::CoerceMany; use crate::coercion::CoerceMany;

View file

@ -7,6 +7,7 @@ use rustc_span::Span;
use rustc_trait_selection::solve::inspect::{ use rustc_trait_selection::solve::inspect::{
InspectConfig, InspectGoal, ProofTreeInferCtxtExt, ProofTreeVisitor, InspectConfig, InspectGoal, ProofTreeInferCtxtExt, ProofTreeVisitor,
}; };
use tracing::{debug, instrument, trace};
use crate::FnCtxt; 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::infer::InferCtxtExt;
use rustc_trait_selection::traits; use rustc_trait_selection::traits;
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _; use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
use tracing::{debug, instrument};
use super::FnCtxt; use super::FnCtxt;
use crate::fn_ctxt::rustc_span::BytePos; 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_middle::ty::{Ty, UserType};
use rustc_span::def_id::LocalDefId; use rustc_span::def_id::LocalDefId;
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
use crate::FnCtxt; use crate::FnCtxt;

View file

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

View file

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

View file

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

View file

@ -22,6 +22,7 @@ use rustc_span::symbol::Ident;
use rustc_span::Span; use rustc_span::Span;
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt; use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
use rustc_trait_selection::traits::{self, NormalizeExt}; use rustc_trait_selection::traits::{self, NormalizeExt};
use tracing::{debug, instrument};
use self::probe::{IsSuggestion, ProbeScope}; use self::probe::{IsSuggestion, ProbeScope};
pub(crate) use self::MethodError::*; 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::symbol::{sym, Ident};
use rustc_span::Span; use rustc_span::Span;
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use tracing::debug;
use crate::method::probe::{self, Pick}; use crate::method::probe::{self, Pick};
use crate::FnCtxt; 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::query::CanonicalTyGoal;
use rustc_trait_selection::traits::{self, ObligationCause, ObligationCtxt}; use rustc_trait_selection::traits::{self, ObligationCause, ObligationCtxt};
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
use tracing::{debug, instrument};
use self::CandidateKind::*; use self::CandidateKind::*;
pub(crate) use self::PickKind::*; 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::{ use rustc_trait_selection::traits::{
supertraits, FulfillmentError, Obligation, ObligationCause, ObligationCauseCode, supertraits, FulfillmentError, Obligation, ObligationCause, ObligationCauseCode,
}; };
use tracing::{debug, info, instrument};
use super::probe::{AutorefOrPtrAdjustment, IsSuggestion, Mode, ProbeScope}; use super::probe::{AutorefOrPtrAdjustment, IsSuggestion, Mode, ProbeScope};
use super::{CandidateSource, MethodError, NoMatchData}; 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::infer::InferCtxtExt;
use rustc_trait_selection::traits::{FulfillmentError, ObligationCtxt}; use rustc_trait_selection::traits::{FulfillmentError, ObligationCtxt};
use rustc_type_ir::TyKind::*; use rustc_type_ir::TyKind::*;
use tracing::debug;
use {rustc_ast as ast, rustc_hir as hir}; use {rustc_ast as ast, rustc_hir as hir};
use super::method::MethodCallee; use super::method::MethodCallee;

View file

@ -24,6 +24,7 @@ use rustc_span::{BytePos, Span, DUMMY_SP};
use rustc_target::abi::FieldIdx; use rustc_target::abi::FieldIdx;
use rustc_trait_selection::infer::InferCtxtExt; use rustc_trait_selection::infer::InferCtxtExt;
use rustc_trait_selection::traits::{ObligationCause, ObligationCauseCode}; use rustc_trait_selection::traits::{ObligationCause, ObligationCauseCode};
use tracing::{debug, instrument, trace};
use ty::VariantDef; use ty::VariantDef;
use super::report_unexpected_variant_res; 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_middle::ty::{self, Ty};
use rustc_span::symbol::{sym, Ident}; use rustc_span::symbol::{sym, Ident};
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
use {rustc_ast as ast, rustc_hir as hir}; use {rustc_ast as ast, rustc_hir as hir};
use crate::method::MethodCallee; use crate::method::MethodCallee;

View file

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

View file

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

View file

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

View file

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

View file

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

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