diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-14 11:07:08 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-19 08:47:55 +0000 |
| commit | 393dea8bc3796a4513477813de1fef99c4fa44a9 (patch) | |
| tree | 7f2f322cd1e5dddf252883c9fa8637ec3ecc8d8e | |
| parent | 9889a6f5d3f07eb2c8480060f46d5c0e710bba8e (diff) | |
| download | rust-393dea8bc3796a4513477813de1fef99c4fa44a9.tar.gz rust-393dea8bc3796a4513477813de1fef99c4fa44a9.zip | |
Allow tracing through item_bounds query invocations on opaques
Previously these caused cycles when printing the result
| -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 } ) |
