Remove #[macro_use] extern crate tracing from rustc_trait_selection.

This commit is contained in:
Nicholas Nethercote 2024-08-30 09:20:26 +10:00
parent cc16c902f1
commit 4b3fa8e9f0
48 changed files with 48 additions and 3 deletions

View File

@ -68,6 +68,7 @@ use rustc_middle::ty::{
}; };
use rustc_span::{sym, BytePos, DesugaringKind, Pos, Span}; use rustc_span::{sym, BytePos, DesugaringKind, Pos, Span};
use rustc_target::spec::abi; use rustc_target::spec::abi;
use tracing::{debug, instrument};
use crate::error_reporting::TypeErrCtxt; use crate::error_reporting::TypeErrCtxt;
use crate::errors::{ObligationCauseFailureCode, TypeErrorAdditionalDiags}; use crate::errors::{ObligationCauseFailureCode, TypeErrorAdditionalDiags};

View File

@ -19,6 +19,7 @@ use rustc_middle::ty::{
}; };
use rustc_span::symbol::{sym, Ident}; use rustc_span::symbol::{sym, Ident};
use rustc_span::{BytePos, FileName, Span, DUMMY_SP}; use rustc_span::{BytePos, FileName, Span, DUMMY_SP};
use tracing::{debug, instrument, warn};
use crate::error_reporting::TypeErrCtxt; use crate::error_reporting::TypeErrCtxt;
use crate::errors::{ use crate::errors::{

View File

@ -5,6 +5,7 @@ use rustc_errors::{Diag, ErrorGuaranteed, Subdiagnostic};
use rustc_hir::def_id::LocalDefId; use rustc_hir::def_id::LocalDefId;
use rustc_hir::Ty; use rustc_hir::Ty;
use rustc_middle::ty::{Region, TyCtxt}; use rustc_middle::ty::{Region, TyCtxt};
use tracing::debug;
use crate::error_reporting::infer::nice_region_error::find_anon_type::find_anon_type; use crate::error_reporting::infer::nice_region_error::find_anon_type::find_anon_type;
use crate::error_reporting::infer::nice_region_error::util::AnonymousParamInfo; use crate::error_reporting::infer::nice_region_error::util::AnonymousParamInfo;

View File

@ -7,6 +7,7 @@ use rustc_middle::hir::map::Map;
use rustc_middle::hir::nested_filter; use rustc_middle::hir::nested_filter;
use rustc_middle::middle::resolve_bound_vars as rbv; use rustc_middle::middle::resolve_bound_vars as rbv;
use rustc_middle::ty::{self, Region, TyCtxt}; use rustc_middle::ty::{self, Region, TyCtxt};
use tracing::debug;
/// This function calls the `visit_ty` method for the parameters /// This function calls the `visit_ty` method for the parameters
/// corresponding to the anonymous regions. The `nested_visitor.found_type` /// corresponding to the anonymous regions. The `nested_visitor.found_type`

View File

@ -7,6 +7,7 @@ use rustc_hir as hir;
use rustc_hir::intravisit::Visitor; use rustc_hir::intravisit::Visitor;
use rustc_middle::bug; use rustc_middle::bug;
use rustc_middle::ty::TypeVisitor; use rustc_middle::ty::TypeVisitor;
use tracing::debug;
use crate::error_reporting::infer::nice_region_error::NiceRegionError; use crate::error_reporting::infer::nice_region_error::NiceRegionError;
use crate::errors::{ use crate::errors::{

View File

@ -4,6 +4,7 @@
use rustc_errors::Diag; use rustc_errors::Diag;
use rustc_middle::ty; use rustc_middle::ty;
use rustc_span::symbol::kw; use rustc_span::symbol::kw;
use tracing::debug;
use crate::error_reporting::infer::nice_region_error::find_anon_type::find_anon_type; use crate::error_reporting::infer::nice_region_error::find_anon_type::find_anon_type;
use crate::error_reporting::infer::nice_region_error::NiceRegionError; use crate::error_reporting::infer::nice_region_error::NiceRegionError;

View File

@ -8,6 +8,7 @@ use rustc_middle::bug;
use rustc_middle::ty::error::ExpectedFound; use rustc_middle::ty::error::ExpectedFound;
use rustc_middle::ty::print::{FmtPrinter, Print, PrintTraitRefExt as _, RegionHighlightMode}; use rustc_middle::ty::print::{FmtPrinter, Print, PrintTraitRefExt as _, RegionHighlightMode};
use rustc_middle::ty::{self, GenericArgsRef, RePlaceholder, Region, TyCtxt}; use rustc_middle::ty::{self, GenericArgsRef, RePlaceholder, Region, TyCtxt};
use tracing::{debug, instrument};
use crate::error_reporting::infer::nice_region_error::NiceRegionError; use crate::error_reporting::infer::nice_region_error::NiceRegionError;
use crate::errors::{ use crate::errors::{

View File

@ -14,6 +14,7 @@ use rustc_middle::ty::{
use rustc_span::def_id::LocalDefId; use rustc_span::def_id::LocalDefId;
use rustc_span::symbol::Ident; use rustc_span::symbol::Ident;
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
use crate::error_reporting::infer::nice_region_error::NiceRegionError; use crate::error_reporting::infer::nice_region_error::NiceRegionError;
use crate::errors::{ use crate::errors::{

View File

@ -11,6 +11,7 @@ use rustc_middle::ty::error::ExpectedFound;
use rustc_middle::ty::print::RegionHighlightMode; use rustc_middle::ty::print::RegionHighlightMode;
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitor}; use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitor};
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
use crate::error_reporting::infer::nice_region_error::NiceRegionError; use crate::error_reporting::infer::nice_region_error::NiceRegionError;
use crate::errors::{ConsiderBorrowingParamHelp, RelationshipHelp, TraitImplDiff}; use crate::errors::{ConsiderBorrowingParamHelp, RelationshipHelp, TraitImplDiff};

View File

@ -5,6 +5,7 @@ use rustc_hir as hir;
use rustc_hir::def_id::LocalDefId; use rustc_hir::def_id::LocalDefId;
use rustc_middle::ty::{self, Binder, Region, Ty, TyCtxt, TypeFoldable}; use rustc_middle::ty::{self, Binder, Region, Ty, TyCtxt, TypeFoldable};
use rustc_span::Span; use rustc_span::Span;
use tracing::instrument;
use crate::error_reporting::infer::nice_region_error::NiceRegionError; use crate::error_reporting::infer::nice_region_error::NiceRegionError;

View File

@ -4,6 +4,7 @@ use rustc_middle::traits::ObligationCauseCode;
use rustc_middle::ty::error::TypeError; use rustc_middle::ty::error::TypeError;
use rustc_middle::ty::{self, IsSuggestable, Region, Ty}; use rustc_middle::ty::{self, IsSuggestable, Region, Ty};
use rustc_span::symbol::kw; use rustc_span::symbol::kw;
use tracing::debug;
use super::ObligationCauseAsDiagArg; use super::ObligationCauseAsDiagArg;
use crate::error_reporting::infer::{note_and_explain_region, TypeErrCtxt}; use crate::error_reporting::infer::{note_and_explain_region, TypeErrCtxt};

View File

@ -9,6 +9,7 @@ use rustc_middle::ty::print::{FmtPrinter, Printer};
use rustc_middle::ty::{self, suggest_constraining_type_param, Ty}; use rustc_middle::ty::{self, suggest_constraining_type_param, Ty};
use rustc_span::def_id::DefId; use rustc_span::def_id::DefId;
use rustc_span::{sym, BytePos, Span, Symbol}; use rustc_span::{sym, BytePos, Span, Symbol};
use tracing::debug;
use crate::error_reporting::TypeErrCtxt; use crate::error_reporting::TypeErrCtxt;
use crate::infer::InferCtxtExt; use crate::infer::InferCtxtExt;

View File

@ -15,6 +15,7 @@ use rustc_middle::ty::{self, IsSuggestable, Region, Ty, TyCtxt, TypeVisitableExt
use rustc_span::symbol::kw; use rustc_span::symbol::kw;
use rustc_span::{BytePos, ErrorGuaranteed, Span, Symbol}; use rustc_span::{BytePos, ErrorGuaranteed, Span, Symbol};
use rustc_type_ir::Upcast as _; use rustc_type_ir::Upcast as _;
use tracing::{debug, instrument};
use super::nice_region_error::find_anon_type; use super::nice_region_error::find_anon_type;
use super::ObligationCauseAsDiagArg; use super::ObligationCauseAsDiagArg;

View File

@ -15,6 +15,7 @@ use rustc_middle::traits::{
use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_middle::ty::{self as ty, GenericArgKind, IsSuggestable, Ty, TypeVisitableExt}; use rustc_middle::ty::{self as ty, GenericArgKind, IsSuggestable, Ty, TypeVisitableExt};
use rustc_span::{sym, Span}; use rustc_span::{sym, Span};
use tracing::debug;
use crate::error_reporting::infer::hir::Path; use crate::error_reporting::infer::hir::Path;
use crate::error_reporting::TypeErrCtxt; use crate::error_reporting::TypeErrCtxt;

View File

@ -15,6 +15,7 @@ use rustc_infer::traits::{
}; };
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitable as _, TypeVisitableExt as _}; use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitable as _, TypeVisitableExt as _};
use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP}; use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP};
use tracing::{debug, instrument};
use crate::error_reporting::infer::need_type_info::TypeAnnotationNeeded; use crate::error_reporting::infer::need_type_info::TypeAnnotationNeeded;
use crate::error_reporting::traits::{to_pretty_impl_header, FindExprBySpan}; use crate::error_reporting::traits::{to_pretty_impl_header, FindExprBySpan};

View File

@ -28,6 +28,7 @@ use rustc_middle::ty::{
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use rustc_span::{BytePos, Span, Symbol, DUMMY_SP}; use rustc_span::{BytePos, Span, Symbol, DUMMY_SP};
use tracing::{debug, instrument};
use super::on_unimplemented::{AppendConstMessage, OnUnimplementedNote}; use super::on_unimplemented::{AppendConstMessage, OnUnimplementedNote};
use super::suggestions::get_explanation_based_on_obligation; use super::suggestions::get_explanation_based_on_obligation;

View File

@ -18,6 +18,7 @@ use rustc_infer::traits::{
use rustc_middle::ty::print::{with_no_trimmed_paths, PrintTraitRefExt as _}; use rustc_middle::ty::print::{with_no_trimmed_paths, PrintTraitRefExt as _};
use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_span::{ErrorGuaranteed, ExpnKind, Span}; use rustc_span::{ErrorGuaranteed, ExpnKind, Span};
use tracing::{info, instrument};
pub use self::overflow::*; pub use self::overflow::*;
use crate::error_reporting::TypeErrCtxt; use crate::error_reporting::TypeErrCtxt;

View File

@ -14,6 +14,7 @@ use rustc_parse_format::{ParseMode, Parser, Piece, Position};
use rustc_session::lint::builtin::UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES; use rustc_session::lint::builtin::UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES;
use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span; use rustc_span::Span;
use tracing::{debug, info};
use {rustc_attr as attr, rustc_hir as hir}; use {rustc_attr as attr, rustc_hir as hir};
use super::{ObligationCauseCode, PredicateObligation}; use super::{ObligationCauseCode, PredicateObligation};

View File

@ -11,6 +11,7 @@ use rustc_middle::ty::{self, TyCtxt};
use rustc_session::Limit; use rustc_session::Limit;
use rustc_span::Span; use rustc_span::Span;
use rustc_type_ir::Upcast; use rustc_type_ir::Upcast;
use tracing::debug;
use crate::error_reporting::TypeErrCtxt; use crate::error_reporting::TypeErrCtxt;

View File

@ -38,6 +38,7 @@ use rustc_span::def_id::LocalDefId;
use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{BytePos, DesugaringKind, ExpnKind, MacroKind, Span, DUMMY_SP}; use rustc_span::{BytePos, DesugaringKind, ExpnKind, MacroKind, Span, DUMMY_SP};
use rustc_target::spec::abi; use rustc_target::spec::abi;
use tracing::{debug, instrument};
use super::{ use super::{
DefIdOrName, FindExprBySpan, ImplCandidate, Obligation, ObligationCause, ObligationCauseCode, DefIdOrName, FindExprBySpan, ImplCandidate, Obligation, ObligationCause, ObligationCauseCode,

View File

@ -9,6 +9,7 @@ use rustc_middle::infer::canonical::{Canonical, CanonicalQueryResponse, QueryRes
use rustc_middle::traits::query::NoSolution; use rustc_middle::traits::query::NoSolution;
use rustc_middle::ty::{self, GenericArg, Ty, TyCtxt, TypeFoldable, TypeVisitableExt, Upcast}; use rustc_middle::ty::{self, GenericArg, Ty, TyCtxt, TypeFoldable, TypeVisitableExt, Upcast};
use rustc_span::DUMMY_SP; use rustc_span::DUMMY_SP;
use tracing::instrument;
use crate::infer::at::ToTrace; use crate::infer::at::ToTrace;
use crate::traits::query::evaluate_obligation::InferCtxtExt as _; use crate::traits::query::evaluate_obligation::InferCtxtExt as _;

View File

@ -34,9 +34,6 @@
#![recursion_limit = "512"] // For rustdoc #![recursion_limit = "512"] // For rustdoc
// tidy-alphabetical-end // tidy-alphabetical-end
#[macro_use]
extern crate tracing;
pub mod error_reporting; pub mod error_reporting;
pub mod errors; pub mod errors;
pub mod infer; pub mod infer;

View File

@ -13,6 +13,7 @@ use rustc_middle::ty::fold::TypeFoldable;
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt as _}; use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt as _};
use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP}; use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP};
use rustc_type_ir::solve::{Certainty, NoSolution, SolverMode}; use rustc_type_ir::solve::{Certainty, NoSolution, SolverMode};
use tracing::trace;
use crate::traits::specialization_graph; use crate::traits::specialization_graph;

View File

@ -13,6 +13,7 @@ use rustc_middle::bug;
use rustc_middle::ty::error::{ExpectedFound, TypeError}; use rustc_middle::ty::error::{ExpectedFound, TypeError};
use rustc_middle::ty::{self, TyCtxt}; use rustc_middle::ty::{self, TyCtxt};
use rustc_next_trait_solver::solve::{GenerateProofTree, SolverDelegateEvalExt as _}; use rustc_next_trait_solver::solve::{GenerateProofTree, SolverDelegateEvalExt as _};
use tracing::instrument;
use super::delegate::SolverDelegate; use super::delegate::SolverDelegate;
use super::inspect::{self, ProofTreeInferCtxtExt, ProofTreeVisitor}; use super::inspect::{self, ProofTreeInferCtxtExt, ProofTreeVisitor};

View File

@ -23,6 +23,7 @@ use rustc_next_trait_solver::resolve::EagerResolver;
use rustc_next_trait_solver::solve::inspect::{self, instantiate_canonical_state}; use rustc_next_trait_solver::solve::inspect::{self, instantiate_canonical_state};
use rustc_next_trait_solver::solve::{GenerateProofTree, MaybeCause, SolverDelegateEvalExt as _}; use rustc_next_trait_solver::solve::{GenerateProofTree, MaybeCause, SolverDelegateEvalExt as _};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::instrument;
use crate::solve::delegate::SolverDelegate; use crate::solve::delegate::SolverDelegate;
use crate::traits::ObligationCtxt; use crate::traits::ObligationCtxt;

View File

@ -11,6 +11,7 @@ use rustc_middle::ty::{
self, FallibleTypeFolder, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable, self, FallibleTypeFolder, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable,
TypeVisitableExt, UniverseIndex, TypeVisitableExt, UniverseIndex,
}; };
use tracing::instrument;
use super::{FulfillmentCtxt, NextSolverError}; use super::{FulfillmentCtxt, NextSolverError};
use crate::error_reporting::traits::OverflowCause; use crate::error_reporting::traits::OverflowCause;

View File

@ -9,6 +9,7 @@ use rustc_data_structures::unord::UnordSet;
use rustc_infer::infer::DefineOpaqueTypes; use rustc_infer::infer::DefineOpaqueTypes;
use rustc_middle::mir::interpret::ErrorHandled; use rustc_middle::mir::interpret::ErrorHandled;
use rustc_middle::ty::{Region, RegionVid}; use rustc_middle::ty::{Region, RegionVid};
use tracing::debug;
use super::*; use super::*;
use crate::errors::UnableToConstructConstantValue; use crate::errors::UnableToConstructConstantValue;

View File

@ -21,6 +21,7 @@ use rustc_middle::ty::{self, Ty, TyCtxt};
pub use rustc_next_trait_solver::coherence::*; pub use rustc_next_trait_solver::coherence::*;
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument, warn};
use super::ObligationCtxt; use super::ObligationCtxt;
use crate::error_reporting::traits::suggest_new_overflow_limit; use crate::error_reporting::traits::suggest_new_overflow_limit;

View File

@ -17,6 +17,7 @@ use rustc_middle::traits::ObligationCause;
use rustc_middle::ty::abstract_const::NotConstEvaluatable; use rustc_middle::ty::abstract_const::NotConstEvaluatable;
use rustc_middle::ty::{self, TyCtxt, TypeVisitable, TypeVisitableExt, TypeVisitor}; use rustc_middle::ty::{self, TyCtxt, TypeVisitable, TypeVisitableExt, TypeVisitor};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument};
use crate::traits::ObligationCtxt; use crate::traits::ObligationCtxt;

View File

@ -13,6 +13,7 @@ use rustc_middle::mir::interpret::ErrorHandled;
use rustc_middle::ty::abstract_const::NotConstEvaluatable; use rustc_middle::ty::abstract_const::NotConstEvaluatable;
use rustc_middle::ty::error::{ExpectedFound, TypeError}; use rustc_middle::ty::error::{ExpectedFound, TypeError};
use rustc_middle::ty::{self, Binder, Const, GenericArgsRef, TypeVisitableExt}; use rustc_middle::ty::{self, Binder, Const, GenericArgsRef, TypeVisitableExt};
use tracing::{debug, debug_span, instrument};
use super::project::{self, ProjectAndUnifyResult}; use super::project::{self, ProjectAndUnifyResult};
use super::select::SelectionContext; use super::select::SelectionContext;

View File

@ -37,6 +37,7 @@ use rustc_middle::ty::{
}; };
use rustc_span::def_id::DefId; use rustc_span::def_id::DefId;
use rustc_span::Span; use rustc_span::Span;
use tracing::{debug, instrument};
pub use self::coherence::{ pub use self::coherence::{
add_placeholder_note, orphan_check_trait_ref, overlapping_impls, InCrate, IsFirstInputType, add_placeholder_note, orphan_check_trait_ref, overlapping_impls, InCrate, IsFirstInputType,

View File

@ -11,6 +11,7 @@ use rustc_middle::traits::{ObligationCause, ObligationCauseCode, Reveal};
use rustc_middle::ty::{ use rustc_middle::ty::{
self, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable, TypeVisitable, TypeVisitableExt, self, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable, TypeVisitable, TypeVisitableExt,
}; };
use tracing::{debug, instrument};
use super::{ use super::{
project, with_replaced_escaping_bound_vars, BoundVarReplacer, PlaceholderReplacer, project, with_replaced_escaping_bound_vars, BoundVarReplacer, PlaceholderReplacer,

View File

@ -24,6 +24,7 @@ use rustc_span::symbol::Symbol;
use rustc_span::Span; use rustc_span::Span;
use rustc_target::abi::Abi; use rustc_target::abi::Abi;
use smallvec::SmallVec; use smallvec::SmallVec;
use tracing::{debug, instrument};
use super::elaborate; use super::elaborate;
use crate::infer::TyCtxtInferExt; use crate::infer::TyCtxtInferExt;

View File

@ -7,6 +7,7 @@ use rustc_middle::span_bug;
pub use rustc_middle::traits::query::OutlivesBound; pub use rustc_middle::traits::query::OutlivesBound;
use rustc_middle::ty::{self, ParamEnv, Ty, TypeFolder, TypeVisitableExt}; use rustc_middle::ty::{self, ParamEnv, Ty, TypeFolder, TypeVisitableExt};
use rustc_span::def_id::LocalDefId; use rustc_span::def_id::LocalDefId;
use tracing::{debug, instrument};
use crate::infer::InferCtxt; use crate::infer::InferCtxt;
use crate::traits::{ObligationCause, ObligationCtxt}; use crate::traits::{ObligationCause, ObligationCtxt};

View File

@ -18,6 +18,7 @@ use rustc_middle::ty::visit::{MaxUniverse, TypeVisitable, TypeVisitableExt};
use rustc_middle::ty::{self, Term, Ty, TyCtxt, Upcast}; use rustc_middle::ty::{self, Term, Ty, TyCtxt, Upcast};
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use tracing::{debug, instrument};
use super::{ use super::{
specialization_graph, translate_args, util, MismatchedProjectionTypes, Normalized, specialization_graph, translate_args, util, MismatchedProjectionTypes, Normalized,

View File

@ -2,6 +2,7 @@ use rustc_data_structures::fx::FxHashSet;
use rustc_middle::traits::query::{DropckConstraint, DropckOutlivesResult}; use rustc_middle::traits::query::{DropckConstraint, DropckOutlivesResult};
use rustc_middle::ty::{self, EarlyBinder, ParamEnvAnd, Ty, TyCtxt}; use rustc_middle::ty::{self, EarlyBinder, ParamEnvAnd, Ty, TyCtxt};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument};
use crate::traits::query::normalize::QueryNormalizeExt; use crate::traits::query::normalize::QueryNormalizeExt;
use crate::traits::query::NoSolution; use crate::traits::query::NoSolution;

View File

@ -10,6 +10,7 @@ use rustc_middle::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeSuperFoldable
use rustc_middle::ty::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt}; use rustc_middle::ty::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt};
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitor}; use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitor};
use rustc_span::DUMMY_SP; use rustc_span::DUMMY_SP;
use tracing::{debug, info, instrument};
use super::NoSolution; use super::NoSolution;
use crate::error_reporting::traits::OverflowCause; use crate::error_reporting::traits::OverflowCause;

View File

@ -5,6 +5,7 @@ use rustc_middle::traits::query::NoSolution;
use rustc_middle::traits::{ObligationCause, ObligationCauseCode}; use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
use rustc_middle::ty::{self, ParamEnvAnd, Ty, TyCtxt, UserArgs, UserSelfTy, UserType}; use rustc_middle::ty::{self, ParamEnvAnd, Ty, TyCtxt, UserArgs, UserSelfTy, UserType};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument};
use crate::infer::canonical::{Canonical, CanonicalQueryResponse}; use crate::infer::canonical::{Canonical, CanonicalQueryResponse};
use crate::traits::ObligationCtxt; use crate::traits::ObligationCtxt;

View File

@ -5,6 +5,7 @@ use rustc_infer::infer::region_constraints::RegionConstraintData;
use rustc_middle::traits::query::NoSolution; use rustc_middle::traits::query::NoSolution;
use rustc_middle::ty::{TyCtxt, TypeFoldable}; use rustc_middle::ty::{TyCtxt, TypeFoldable};
use rustc_span::Span; use rustc_span::Span;
use tracing::info;
use crate::infer::canonical::query_response; use crate::infer::canonical::query_response;
use crate::infer::InferCtxt; use crate::infer::InferCtxt;

View File

@ -9,6 +9,7 @@ use rustc_span::def_id::CRATE_DEF_ID;
use rustc_span::DUMMY_SP; use rustc_span::DUMMY_SP;
use rustc_type_ir::outlives::{push_outlives_components, Component}; use rustc_type_ir::outlives::{push_outlives_components, Component};
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
use tracing::debug;
use crate::traits::query::NoSolution; use crate::traits::query::NoSolution;
use crate::traits::{wf, ObligationCtxt}; use crate::traits::{wf, ObligationCtxt};

View File

@ -16,6 +16,7 @@ use rustc_infer::traits::{Obligation, ObligationCause, PolyTraitObligation, Sele
use rustc_middle::ty::fast_reject::{DeepRejectCtxt, TreatParams}; use rustc_middle::ty::fast_reject::{DeepRejectCtxt, TreatParams};
use rustc_middle::ty::{self, ToPolyTraitRef, Ty, TypeVisitableExt}; use rustc_middle::ty::{self, ToPolyTraitRef, Ty, TypeVisitableExt};
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use tracing::{debug, instrument, trace};
use super::SelectionCandidate::*; use super::SelectionCandidate::*;
use super::{BuiltinImplConditions, SelectionCandidateSet, SelectionContext, TraitObligationStack}; use super::{BuiltinImplConditions, SelectionCandidateSet, SelectionContext, TraitObligationStack};

View File

@ -21,6 +21,7 @@ use rustc_middle::ty::{
}; };
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use rustc_span::def_id::DefId; use rustc_span::def_id::DefId;
use tracing::{debug, instrument};
use super::SelectionCandidate::{self, *}; use super::SelectionCandidate::{self, *};
use super::{BuiltinImplConditions, SelectionContext}; use super::{BuiltinImplConditions, SelectionContext};

View File

@ -31,6 +31,7 @@ use rustc_middle::ty::{
}; };
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use rustc_span::Symbol; use rustc_span::Symbol;
use tracing::{debug, instrument, trace};
use self::EvaluationResult::*; use self::EvaluationResult::*;
use self::SelectionCandidate::*; use self::SelectionCandidate::*;

View File

@ -10,6 +10,7 @@
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/specialization.html //! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/specialization.html
pub mod specialization_graph; pub mod specialization_graph;
use rustc_data_structures::fx::FxIndexSet; use rustc_data_structures::fx::FxIndexSet;
use rustc_errors::codes::*; use rustc_errors::codes::*;
use rustc_errors::{Diag, EmissionGuarantee}; use rustc_errors::{Diag, EmissionGuarantee};
@ -22,6 +23,7 @@ use rustc_middle::ty::{self, GenericArgsRef, ImplSubject, Ty, TyCtxt, TypeVisita
use rustc_session::lint::builtin::{COHERENCE_LEAK_CHECK, ORDER_DEPENDENT_TRAIT_OBJECTS}; use rustc_session::lint::builtin::{COHERENCE_LEAK_CHECK, ORDER_DEPENDENT_TRAIT_OBJECTS};
use rustc_span::{sym, ErrorGuaranteed, Span, DUMMY_SP}; use rustc_span::{sym, ErrorGuaranteed, Span, DUMMY_SP};
use specialization_graph::GraphExt; use specialization_graph::GraphExt;
use tracing::{debug, instrument};
use super::{util, SelectionContext}; use super::{util, SelectionContext};
use crate::error_reporting::traits::to_pretty_impl_header; use crate::error_reporting::traits::to_pretty_impl_header;

View File

@ -5,6 +5,7 @@ use rustc_middle::bug;
pub use rustc_middle::traits::specialization_graph::*; pub use rustc_middle::traits::specialization_graph::*;
use rustc_middle::ty::fast_reject::{self, SimplifiedType, TreatParams}; use rustc_middle::ty::fast_reject::{self, SimplifiedType, TreatParams};
use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt}; use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt};
use tracing::{debug, instrument};
use super::OverlapError; use super::OverlapError;
use crate::traits; use crate::traits;

View File

@ -12,6 +12,7 @@ use rustc_middle::ty::{
}; };
use rustc_span::Span; use rustc_span::Span;
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
use tracing::debug;
use super::{NormalizeExt, ObligationCause, PredicateObligation, SelectionContext}; use super::{NormalizeExt, ObligationCause, PredicateObligation, SelectionContext};

View File

@ -10,6 +10,7 @@ use rustc_middle::ty::{
}; };
use rustc_span::{sym, Span, DUMMY_SP}; use rustc_span::{sym, Span, DUMMY_SP};
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
use tracing::debug;
use crate::errors::DumpVTableEntries; use crate::errors::DumpVTableEntries;
use crate::traits::{impossible_predicates, is_vtable_safe_method}; use crate::traits::{impossible_predicates, is_vtable_safe_method};

View File

@ -10,6 +10,7 @@ use rustc_middle::ty::{
}; };
use rustc_span::def_id::{DefId, LocalDefId, CRATE_DEF_ID}; use rustc_span::def_id::{DefId, LocalDefId, CRATE_DEF_ID};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument, trace};
use crate::infer::InferCtxt; use crate::infer::InferCtxt;
use crate::traits; use crate::traits;