@@ -23,7 +23,7 @@ use rustc_trait_selection::opaque_types::{
2323} ;
2424use rustc_trait_selection:: solve:: NoSolution ;
2525use rustc_trait_selection:: traits:: query:: type_op:: custom:: CustomTypeOp ;
26- use tracing:: { debug, instrument} ;
26+ use tracing:: { debug, debug_span , instrument} ;
2727
2828use super :: reverse_sccs:: ReverseSccGraph ;
2929use super :: values:: RegionValues ;
@@ -196,6 +196,8 @@ pub(crate) fn handle_opaque_type_uses<'tcx>(
196196 } )
197197 . collect :: < Vec < _ > > ( ) ;
198198
199+ debug ! ( ?opaque_types) ;
200+
199201 collect_defining_uses (
200202 root_cx,
201203 infcx,
@@ -287,6 +289,7 @@ fn apply_member_constraints<'tcx>(
287289 defining_uses : & [ DefiningUse < ' tcx > ] ,
288290) {
289291 for DefiningUse { opaque_type_key : _, arg_regions, hidden_type } in defining_uses {
292+ let _span = debug_span ! ( "apply_member_constraints" , ?arg_regions, ?hidden_type) ;
290293 let mut visitor =
291294 ApplyMemberConstraintsVisitor { rcx, arg_regions, span : hidden_type. span , constraints } ;
292295 hidden_type. ty . visit_with ( & mut visitor) ;
@@ -316,6 +319,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ApplyMemberConstraintsVisitor<'_, 'tcx>
316319 //
317320 // If there's a unique minimum choice, we emit a `'member: 'min_choice` constraint.
318321 // Note that we do not require the two regions to be equal... TODO examples
322+ #[ instrument( level = "debug" , skip( self ) ) ]
319323 fn visit_region ( & mut self , r : Region < ' tcx > ) {
320324 let member_vid = match r. kind ( ) {
321325 ty:: ReBound ( ..) => return ,
@@ -445,6 +449,7 @@ fn map_defining_uses_to_definition_site<'tcx>(
445449 let vid = rcx. representative ( r. as_var ( ) ) ;
446450 rcx. definitions [ vid] . external_name . unwrap ( )
447451 } ) ;
452+ let _span = debug_span ! ( "map_defining_uses_to_definition_site" , ?opaque_type_key, ?arg_regions, ?hidden_type) ;
448453 // TODO: explain what's going on here
449454 let mut visitor =
450455 HiddenTypeMeh { rcx, arg_regions, opaque_type_key, hidden_type, deferred_errors } ;
0 commit comments