Skip to content

Commit cc4ace3

Browse files
authored
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.
2 parents be3b566 + 393dea8 commit cc4ace3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/rustc_hir_analysis/src/collect/item_bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn associated_type_bounds<'tcx>(
5959
/// impl trait it isn't possible to write a suitable predicate on the
6060
/// containing function and for type-alias impl trait we don't have a backwards
6161
/// compatibility issue.
62-
#[instrument(level = "trace", skip(tcx), ret)]
62+
#[instrument(level = "trace", skip(tcx, item_ty))]
6363
fn opaque_type_bounds<'tcx>(
6464
tcx: TyCtxt<'tcx>,
6565
opaque_def_id: LocalDefId,

compiler/rustc_query_impl/src/plumbing.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ macro_rules! define_queries {
620620
tcx,
621621
{
622622
let ret = call_provider!([$($modifiers)*][tcx, $name, key]);
623-
tracing::trace!(?ret);
623+
rustc_middle::ty::print::with_reduced_queries!({
624+
tracing::trace!(?ret);
625+
});
624626
ret
625627
}
626628
)

0 commit comments

Comments
 (0)