@@ -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 ;
@@ -198,6 +198,8 @@ pub(crate) fn handle_opaque_type_uses<'tcx>(
198
198
} )
199
199
. collect :: < Vec < _ > > ( ) ;
200
200
201
+ debug ! ( ?opaque_types) ;
202
+
201
203
collect_defining_uses (
202
204
root_cx,
203
205
infcx,
@@ -289,6 +291,7 @@ fn apply_member_constraints<'tcx>(
289
291
defining_uses : & [ DefiningUse < ' tcx > ] ,
290
292
) {
291
293
for DefiningUse { opaque_type_key : _, arg_regions, hidden_type } in defining_uses {
294
+ let _span = debug_span ! ( "apply_member_constraints" , ?arg_regions, ?hidden_type) ;
292
295
let mut visitor =
293
296
ApplyMemberConstraintsVisitor { rcx, arg_regions, span : hidden_type. span , constraints } ;
294
297
hidden_type. ty . visit_with ( & mut visitor) ;
@@ -318,6 +321,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ApplyMemberConstraintsVisitor<'_, 'tcx>
318
321
//
319
322
// If there's a unique minimum choice, we emit a `'member: 'min_choice` constraint.
320
323
// Note that we do not require the two regions to be equal... TODO examples
324
+ #[ instrument( level = "debug" , skip( self ) ) ]
321
325
fn visit_region ( & mut self , r : Region < ' tcx > ) {
322
326
let member_vid = match r. kind ( ) {
323
327
ty:: ReBound ( ..) => return ,
@@ -447,6 +451,7 @@ fn map_defining_uses_to_definition_site<'tcx>(
447
451
let vid = rcx. representative ( r. as_var ( ) ) ;
448
452
rcx. definitions [ vid] . external_name . unwrap ( )
449
453
} ) ;
454
+ let _span = debug_span ! ( "map_defining_uses_to_definition_site" , ?opaque_type_key, ?arg_regions, ?hidden_type) ;
450
455
// TODO: explain what's going on here
451
456
let mut visitor =
452
457
HiddenTypeMeh { rcx, arg_regions, opaque_type_key, hidden_type, deferred_errors } ;
0 commit comments