Skip to content

Commit

Permalink
Rollup merge of rust-lang#126674 - oli-obk:tracing_item_bounds, r=lqd
Browse files Browse the repository at this point in the history
Allow tracing through item_bounds query invocations on opaques

Previously these caused cycles when printing the result of the query.
  • Loading branch information
GuillaumeGomez authored Jun 19, 2024
2 parents 3186d17 + 393dea8 commit e293881
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/collect/item_bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_query_impl/src/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
)
Expand Down

0 comments on commit e293881

Please sign in to comment.