diff options
| author | fee1-dead <ent3rm4n@gmail.com> | 2024-06-19 22:51:04 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-19 22:51:04 +0800 |
| commit | cc4ace33cfce8e1e3bba067206f9a1203d4ea170 (patch) | |
| tree | b641d0431c49ba2479da62d2780f9b5d59bac62b | |
| parent | be3b5663aed35385a7acb8dded3fbe22a74e4caf (diff) | |
| parent | 393dea8bc3796a4513477813de1fef99c4fa44a9 (diff) | |
| download | rust-cc4ace33cfce8e1e3bba067206f9a1203d4ea170.tar.gz rust-cc4ace33cfce8e1e3bba067206f9a1203d4ea170.zip | |
Rollup merge of #126674 - oli-obk:tracing_item_bounds, r=lqd
Allow tracing through item_bounds query invocations on opaques Previously these caused cycles when printing the result of the query.
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect/item_bounds.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect/item_bounds.rs b/compiler/rustc_hir_analysis/src/collect/item_bounds.rs index 50c93e9f1d7..94d6e13d751 100644 --- a/compiler/rustc_hir_analysis/src/collect/item_bounds.rs +++ b/compiler/rustc_hir_analysis/src/collect/item_bounds.rs @@ -59,7 +59,7 @@ fn associated_type_bounds<'tcx>( /// impl trait it isn't possible to write a suitable predicate on the /// containing function and for type-alias impl trait we don't have a backwards /// compatibility issue. -#[instrument(level = "trace", skip(tcx), ret)] +#[instrument(level = "trace", skip(tcx, item_ty))] fn opaque_type_bounds<'tcx>( tcx: TyCtxt<'tcx>, opaque_def_id: LocalDefId, diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 86531bd9590..62e39377214 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -620,7 +620,9 @@ macro_rules! define_queries { tcx, { let ret = call_provider!([$($modifiers)*][tcx, $name, key]); - tracing::trace!(?ret); + rustc_middle::ty::print::with_reduced_queries!({ + tracing::trace!(?ret); + }); ret } ) |
