From 340e708634e7cc560c04e27b91297ff04f897683 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 16 May 2022 14:23:15 +0000 Subject: [PATCH] Some tracing cleanups --- .../rustc_borrowck/src/type_check/free_region_relations.rs | 2 +- compiler/rustc_infer/src/infer/outlives/mod.rs | 2 +- compiler/rustc_typeck/src/check/regionck.rs | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_borrowck/src/type_check/free_region_relations.rs b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs index f08f2e1b12da..aa17e2736798 100644 --- a/compiler/rustc_borrowck/src/type_check/free_region_relations.rs +++ b/compiler/rustc_borrowck/src/type_check/free_region_relations.rs @@ -334,8 +334,8 @@ impl<'tcx> UniversalRegionRelationsBuilder<'_, 'tcx> { /// either the return type of the MIR or one of its arguments. At /// the same time, compute and add any implied bounds that come /// from this local. + #[instrument(level = "debug", skip(self))] fn add_implied_bounds(&mut self, ty: Ty<'tcx>) -> Option>> { - debug!("add_implied_bounds(ty={:?})", ty); let TypeOpOutput { output: bounds, constraints, .. } = self .param_env .and(type_op::implied_outlives_bounds::ImpliedOutlivesBounds { ty }) diff --git a/compiler/rustc_infer/src/infer/outlives/mod.rs b/compiler/rustc_infer/src/infer/outlives/mod.rs index 03d6c45a6534..b9652e83e65b 100644 --- a/compiler/rustc_infer/src/infer/outlives/mod.rs +++ b/compiler/rustc_infer/src/infer/outlives/mod.rs @@ -8,10 +8,10 @@ pub mod verify; use rustc_middle::traits::query::OutlivesBound; use rustc_middle::ty; +#[instrument(level = "debug", skip(param_env))] pub fn explicit_outlives_bounds<'tcx>( param_env: ty::ParamEnv<'tcx>, ) -> impl Iterator> + 'tcx { - debug!("explicit_outlives_bounds()"); param_env .caller_bounds() .into_iter() diff --git a/compiler/rustc_typeck/src/check/regionck.rs b/compiler/rustc_typeck/src/check/regionck.rs index 20456cc427c5..2ba8cb24f8b4 100644 --- a/compiler/rustc_typeck/src/check/regionck.rs +++ b/compiler/rustc_typeck/src/check/regionck.rs @@ -130,6 +130,7 @@ impl<'tcx> OutlivesEnvironmentExt<'tcx> for OutlivesEnvironment<'tcx> { /// add those assumptions into the outlives-environment. /// /// Tests: `src/test/ui/regions/regions-free-region-ordering-*.rs` + #[instrument(level = "debug", skip(self, infcx))] fn add_implied_bounds<'a>( &mut self, infcx: &InferCtxt<'a, 'tcx>, @@ -137,11 +138,8 @@ impl<'tcx> OutlivesEnvironmentExt<'tcx> for OutlivesEnvironment<'tcx> { body_id: hir::HirId, span: Span, ) { - debug!("add_implied_bounds()"); - for ty in fn_sig_tys { let ty = infcx.resolve_vars_if_possible(ty); - debug!("add_implied_bounds: ty = {}", ty); let implied_bounds = infcx.implied_outlives_bounds(self.param_env, body_id, ty, span); self.add_outlives_bounds(Some(infcx), implied_bounds) }