1
Fork 0

reduce query calls in pretty printing when finding bounds of

associated types
This commit is contained in:
Adwin White 2025-02-10 14:43:22 +08:00
parent 942db6782f
commit a634246b66

View file

@ -30,6 +30,7 @@ fn associated_type_bounds<'tcx>(
span: Span, span: Span,
filter: PredicateFilter, filter: PredicateFilter,
) -> &'tcx [(ty::Clause<'tcx>, Span)] { ) -> &'tcx [(ty::Clause<'tcx>, Span)] {
ty::print::with_reduced_queries!({
let item_ty = Ty::new_projection_from_args( let item_ty = Ty::new_projection_from_args(
tcx, tcx,
assoc_item_def_id.to_def_id(), assoc_item_def_id.to_def_id(),
@ -77,6 +78,7 @@ fn associated_type_bounds<'tcx>(
assert_only_contains_predicates_from(filter, all_bounds, item_ty); assert_only_contains_predicates_from(filter, all_bounds, item_ty);
all_bounds all_bounds
})
} }
/// The code below is quite involved, so let me explain. /// The code below is quite involved, so let me explain.