From fb6f4b4a6e3fa850d93535c0cbee6cabfb65d6cf Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 17 Jun 2024 19:12:23 -0400 Subject: [PATCH] Explicitly import tracing macros --- compiler/rustc_next_trait_solver/src/lib.rs | 4 ---- compiler/rustc_next_trait_solver/src/solve/alias_relate.rs | 1 + compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs | 1 + .../src/solve/assembly/structural_traits.rs | 1 + .../src/solve/eval_ctxt/canonical.rs | 1 + compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs | 1 + .../rustc_next_trait_solver/src/solve/eval_ctxt/probe.rs | 1 + compiler/rustc_next_trait_solver/src/solve/mod.rs | 6 +++--- .../src/solve/normalizes_to/anon_const.rs | 1 + .../rustc_next_trait_solver/src/solve/normalizes_to/mod.rs | 1 + compiler/rustc_next_trait_solver/src/solve/project_goals.rs | 1 + compiler/rustc_next_trait_solver/src/solve/search_graph.rs | 1 + compiler/rustc_next_trait_solver/src/solve/trait_goals.rs | 1 + 13 files changed, 14 insertions(+), 7 deletions(-) diff --git a/compiler/rustc_next_trait_solver/src/lib.rs b/compiler/rustc_next_trait_solver/src/lib.rs index a6002bfd7ca48..79c6925221e14 100644 --- a/compiler/rustc_next_trait_solver/src/lib.rs +++ b/compiler/rustc_next_trait_solver/src/lib.rs @@ -6,10 +6,6 @@ #![feature(let_chains)] -// TODO: remove this, use explicit imports. -#[macro_use] -extern crate tracing; - pub mod canonicalizer; pub mod infcx; pub mod resolve; diff --git a/compiler/rustc_next_trait_solver/src/solve/alias_relate.rs b/compiler/rustc_next_trait_solver/src/solve/alias_relate.rs index 3228146c6890f..fbc8ac1d5d5c5 100644 --- a/compiler/rustc_next_trait_solver/src/solve/alias_relate.rs +++ b/compiler/rustc_next_trait_solver/src/solve/alias_relate.rs @@ -17,6 +17,7 @@ use rustc_type_ir::inherent::*; use rustc_type_ir::{self as ty, Interner}; +use tracing::{instrument, trace}; use crate::infcx::SolverDelegate; use crate::solve::{Certainty, EvalCtxt, Goal, QueryResult}; diff --git a/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs b/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs index 2664b3916e186..9a1537d260608 100644 --- a/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs @@ -7,6 +7,7 @@ use rustc_type_ir::inherent::*; use rustc_type_ir::lang_items::TraitSolverLangItem; use rustc_type_ir::visit::TypeVisitableExt as _; use rustc_type_ir::{self as ty, Interner, Upcast as _}; +use tracing::{debug, instrument}; use crate::infcx::SolverDelegate; use crate::solve::inspect::ProbeKind; diff --git a/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs b/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs index eb37add61cc49..202af76565a88 100644 --- a/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs +++ b/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs @@ -8,6 +8,7 @@ use rustc_type_ir::inherent::*; use rustc_type_ir::lang_items::TraitSolverLangItem; use rustc_type_ir::{self as ty, Interner, Upcast as _}; use rustc_type_ir_macros::{TypeFoldable_Generic, TypeVisitable_Generic}; +use tracing::instrument; use crate::infcx::SolverDelegate; use crate::solve::{EvalCtxt, Goal, NoSolution}; diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs index 29222c6a05e3f..c6611285a3bed 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs @@ -15,6 +15,7 @@ use rustc_index::IndexVec; use rustc_type_ir::fold::TypeFoldable; use rustc_type_ir::inherent::*; use rustc_type_ir::{self as ty, Canonical, CanonicalVarValues, Interner}; +use tracing::{instrument, trace}; use crate::canonicalizer::{CanonicalizeMode, Canonicalizer}; use crate::infcx::SolverDelegate; diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs index 54c669f1e8473..6775d6ddae459 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs @@ -8,6 +8,7 @@ use rustc_type_ir::relate::Relate; use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor}; use rustc_type_ir::{self as ty, CanonicalVarValues, Interner}; use rustc_type_ir_macros::{Lift_Generic, TypeFoldable_Generic, TypeVisitable_Generic}; +use tracing::{instrument, trace}; use crate::infcx::SolverDelegate; use crate::solve::inspect::{self, ProofTreeBuilder}; diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/probe.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/probe.rs index 31edb6354156b..1c5358b3edb4d 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/probe.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/probe.rs @@ -1,6 +1,7 @@ use std::marker::PhantomData; use rustc_type_ir::Interner; +use tracing::instrument; use crate::infcx::SolverDelegate; use crate::solve::assembly::Candidate; diff --git a/compiler/rustc_next_trait_solver/src/solve/mod.rs b/compiler/rustc_next_trait_solver/src/solve/mod.rs index 6c05394504fa9..02069016c2bde 100644 --- a/compiler/rustc_next_trait_solver/src/solve/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/mod.rs @@ -23,12 +23,12 @@ mod project_goals; mod search_graph; mod trait_goals; -pub use self::eval_ctxt::{EvalCtxt, GenerateProofTree, SolverDelegateEvalExt}; -pub use rustc_type_ir::solve::*; - use rustc_type_ir::inherent::*; +pub use rustc_type_ir::solve::*; use rustc_type_ir::{self as ty, Interner}; +use tracing::instrument; +pub use self::eval_ctxt::{EvalCtxt, GenerateProofTree, SolverDelegateEvalExt}; use crate::infcx::SolverDelegate; /// How many fixpoint iterations we should attempt inside of the solver before bailing diff --git a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/anon_const.rs b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/anon_const.rs index 9f1917fde8453..0f1c1f13c165e 100644 --- a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/anon_const.rs +++ b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/anon_const.rs @@ -1,4 +1,5 @@ use rustc_type_ir::{self as ty, Interner}; +use tracing::instrument; use crate::infcx::SolverDelegate; use crate::solve::{Certainty, EvalCtxt, Goal, QueryResult}; diff --git a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs index cbc18449f0a06..ebc83bef5137b 100644 --- a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs @@ -7,6 +7,7 @@ use rustc_type_ir::inherent::*; use rustc_type_ir::lang_items::TraitSolverLangItem; use rustc_type_ir::Upcast as _; use rustc_type_ir::{self as ty, Interner, NormalizesTo}; +use tracing::instrument; use crate::infcx::SolverDelegate; use crate::solve::assembly::structural_traits::{self, AsyncCallableRelevantTypes}; diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals.rs index b20c274b62ce2..4bb1fe5be6f01 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals.rs @@ -1,4 +1,5 @@ use rustc_type_ir::{self as ty, Interner, ProjectionPredicate}; +use tracing::instrument; use crate::infcx::SolverDelegate; use crate::solve::{Certainty, EvalCtxt, Goal, GoalSource, QueryResult}; diff --git a/compiler/rustc_next_trait_solver/src/solve/search_graph.rs b/compiler/rustc_next_trait_solver/src/solve/search_graph.rs index 10507a507559a..b923a121d814c 100644 --- a/compiler/rustc_next_trait_solver/src/solve/search_graph.rs +++ b/compiler/rustc_next_trait_solver/src/solve/search_graph.rs @@ -4,6 +4,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_index::{Idx, IndexVec}; use rustc_type_ir::inherent::*; use rustc_type_ir::Interner; +use tracing::debug; use crate::infcx::SolverDelegate; use crate::solve::inspect::{self, ProofTreeBuilder}; diff --git a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs index 19eee82edc069..7f46d72cba839 100644 --- a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs @@ -6,6 +6,7 @@ use rustc_type_ir::inherent::*; use rustc_type_ir::lang_items::TraitSolverLangItem; use rustc_type_ir::visit::TypeVisitableExt as _; use rustc_type_ir::{self as ty, Interner, TraitPredicate, Upcast as _}; +use tracing::{instrument, trace}; use crate::infcx::SolverDelegate; use crate::solve::assembly::structural_traits::{self, AsyncCallableRelevantTypes};