Skip to content

Commit 40eb78f

Browse files
committed
reduce query calls in pretty printing when finding item bounds of synthesized GATs
1 parent 942db67 commit 40eb78f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

compiler/rustc_hir_analysis/src/collect/item_bounds.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,13 @@ pub(super) fn explicit_item_bounds_with_filter(
367367
// a projection self type.
368368
Some(ty::ImplTraitInTraitData::Trait { opaque_def_id, .. }) => {
369369
let opaque_ty = tcx.hir_node_by_def_id(opaque_def_id.expect_local()).expect_opaque_ty();
370-
let bounds =
371-
associated_type_bounds(tcx, def_id, opaque_ty.bounds, opaque_ty.span, filter);
370+
let bounds = ty::print::with_reduced_queries!(associated_type_bounds(
371+
tcx,
372+
def_id,
373+
opaque_ty.bounds,
374+
opaque_ty.span,
375+
filter
376+
));
372377
return ty::EarlyBinder::bind(bounds);
373378
}
374379
Some(ty::ImplTraitInTraitData::Impl { .. }) => {

0 commit comments

Comments
 (0)