File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
rustc_middle/src/ty/print Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ thread_local! {
6565/// Avoids running any queries during any prints that occur
6666/// during the closure. This may alter the appearance of some
6767/// types (e.g. forcing verbose printing for opaque types).
68- /// This method is used during some queries (e.g. `predicates_of `
68+ /// This method is used during some queries (e.g. `explicit_item_bounds `
6969/// for opaque types), to ensure that any debug printing that
7070/// occurs during the query computation does not end up recursively
7171/// calling the same query.
Original file line number Diff line number Diff line change @@ -61,23 +61,23 @@ fn opaque_type_bounds<'tcx>(
6161 bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] ,
6262 span : Span ,
6363) -> & ' tcx [ ( ty:: Predicate < ' tcx > , Span ) ] {
64- let item_ty =
65- tcx. mk_opaque ( opaque_def_id, InternalSubsts :: identity_for_item ( tcx, opaque_def_id) ) ;
64+ ty:: print:: with_no_queries ( || {
65+ let item_ty =
66+ tcx. mk_opaque ( opaque_def_id, InternalSubsts :: identity_for_item ( tcx, opaque_def_id) ) ;
6667
67- let bounds = ty:: print:: with_no_queries ( || {
68- AstConv :: compute_bounds (
68+ let bounds = AstConv :: compute_bounds (
6969 & ItemCtxt :: new ( tcx, opaque_def_id) ,
7070 item_ty,
7171 bounds,
7272 SizedByDefault :: Yes ,
7373 span,
7474 )
75- } ) ;
75+ . predicates ( tcx , item_ty ) ;
7676
77- let bounds = bounds. predicates ( tcx, item_ty) ;
78- debug ! ( "opaque_type_bounds({}) = {:?}" , tcx. def_path_str( opaque_def_id) , bounds) ;
77+ debug ! ( "opaque_type_bounds({}) = {:?}" , tcx. def_path_str( opaque_def_id) , bounds) ;
7978
80- tcx. arena . alloc_slice ( & bounds)
79+ tcx. arena . alloc_slice ( & bounds)
80+ } )
8181}
8282
8383pub ( super ) fn explicit_item_bounds (
You can’t perform that action at this time.
0 commit comments