@@ -23,7 +23,7 @@ use rustc_trait_selection::opaque_types::{
23
23
} ;
24
24
use rustc_trait_selection:: solve:: NoSolution ;
25
25
use rustc_trait_selection:: traits:: query:: type_op:: custom:: CustomTypeOp ;
26
- use tracing:: { debug, instrument} ;
26
+ use tracing:: { debug, debug_span , instrument} ;
27
27
28
28
use super :: reverse_sccs:: ReverseSccGraph ;
29
29
use super :: values:: RegionValues ;
@@ -196,6 +196,8 @@ pub(crate) fn handle_opaque_type_uses<'tcx>(
196
196
} )
197
197
. collect :: < Vec < _ > > ( ) ;
198
198
199
+ debug ! ( ?opaque_types) ;
200
+
199
201
collect_defining_uses (
200
202
root_cx,
201
203
infcx,
@@ -287,6 +289,7 @@ fn apply_member_constraints<'tcx>(
287
289
defining_uses : & [ DefiningUse < ' tcx > ] ,
288
290
) {
289
291
for DefiningUse { opaque_type_key : _, arg_regions, hidden_type } in defining_uses {
292
+ let _span = debug_span ! ( "apply_member_constraints" , ?arg_regions, ?hidden_type) ;
290
293
let mut visitor =
291
294
ApplyMemberConstraintsVisitor { rcx, arg_regions, span : hidden_type. span , constraints } ;
292
295
hidden_type. ty . visit_with ( & mut visitor) ;
@@ -316,6 +319,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ApplyMemberConstraintsVisitor<'_, 'tcx>
316
319
//
317
320
// If there's a unique minimum choice, we emit a `'member: 'min_choice` constraint.
318
321
// Note that we do not require the two regions to be equal... TODO examples
322
+ #[ instrument( level = "debug" , skip( self ) ) ]
319
323
fn visit_region ( & mut self , r : Region < ' tcx > ) {
320
324
let member_vid = match r. kind ( ) {
321
325
ty:: ReBound ( ..) => return ,
@@ -445,6 +449,7 @@ fn map_defining_uses_to_definition_site<'tcx>(
445
449
let vid = rcx. representative ( r. as_var ( ) ) ;
446
450
rcx. definitions [ vid] . external_name . unwrap ( )
447
451
} ) ;
452
+ let _span = debug_span ! ( "map_defining_uses_to_definition_site" , ?opaque_type_key, ?arg_regions, ?hidden_type) ;
448
453
// TODO: explain what's going on here
449
454
let mut visitor =
450
455
HiddenTypeMeh { rcx, arg_regions, opaque_type_key, hidden_type, deferred_errors } ;
0 commit comments