@@ -369,7 +369,7 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
369
369
370
370
let tcx = self . tcx ( ) ;
371
371
let generics = tcx. generics_of ( def_id) ;
372
- debug ! ( "generics: {:?}" , generics) ;
372
+ debug ! ( ? generics) ;
373
373
374
374
if generics. has_self {
375
375
if generics. parent . is_some ( ) {
@@ -989,15 +989,9 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
989
989
) -> Result < ty:: PolyTraitRef < ' tcx > , ErrorGuaranteed > {
990
990
let tcx = self . tcx ( ) ;
991
991
992
- debug ! (
993
- "find_bound_for_assoc_item(ty_param_def_id={:?}, assoc_name={:?}, span={:?})" ,
994
- ty_param_def_id, assoc_name, span,
995
- ) ;
996
-
997
992
let predicates =
998
993
& self . get_type_parameter_bounds ( span, ty_param_def_id, assoc_name) . predicates ;
999
-
1000
- debug ! ( "find_bound_for_assoc_item: predicates={:#?}" , predicates) ;
994
+ debug ! ( ?predicates) ;
1001
995
1002
996
let param_name = tcx. hir ( ) . ty_param_name ( ty_param_def_id) ;
1003
997
self . one_bound_for_assoc_item (
@@ -1156,7 +1150,10 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
1156
1150
assoc_segment : & hir:: PathSegment < ' tcx > ,
1157
1151
permit_variants : bool ,
1158
1152
) -> Result < ( Ty < ' tcx > , DefKind , DefId ) , ErrorGuaranteed > {
1153
+ let _guard = tracing:: debug_span!( "lower_assoc_path_to_ty" ) . entered ( ) ;
1154
+ debug ! ( %qself_ty, ?assoc_segment. ident) ;
1159
1155
let tcx = self . tcx ( ) ;
1156
+
1160
1157
let assoc_ident = assoc_segment. ident ;
1161
1158
let qself_res = if let hir:: TyKind :: Path ( hir:: QPath :: Resolved ( _, path) ) = & qself. kind {
1162
1159
path. res
@@ -1709,25 +1706,23 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
1709
1706
item_segment : & hir:: PathSegment < ' tcx > ,
1710
1707
constness : ty:: BoundConstness ,
1711
1708
) -> Ty < ' tcx > {
1709
+ let _guard = tracing:: debug_span!( "lower_qpath_to_ty" ) . entered ( ) ;
1712
1710
let tcx = self . tcx ( ) ;
1713
1711
1714
1712
let trait_def_id = tcx. parent ( item_def_id) ;
1715
-
1716
- debug ! ( "qpath_to_ty: trait_def_id={:?}" , trait_def_id) ;
1713
+ debug ! ( ?trait_def_id) ;
1717
1714
1718
1715
let Some ( self_ty) = opt_self_ty else {
1719
1716
let path_str = tcx. def_path_str ( trait_def_id) ;
1720
1717
1721
1718
let def_id = self . item_def_id ( ) ;
1722
-
1723
- debug ! ( "qpath_to_ty: self.item_def_id()={:?}" , def_id) ;
1719
+ debug ! ( item_def_id = ?def_id) ;
1724
1720
1725
1721
let parent_def_id = def_id
1726
1722
. as_local ( )
1727
1723
. map ( |def_id| tcx. local_def_id_to_hir_id ( def_id) )
1728
1724
. map ( |hir_id| tcx. hir ( ) . get_parent_item ( hir_id) . to_def_id ( ) ) ;
1729
-
1730
- debug ! ( "qpath_to_ty: parent_def_id={:?}" , parent_def_id) ;
1725
+ debug ! ( ?parent_def_id) ;
1731
1726
1732
1727
// If the trait in segment is the same as the trait defining the item,
1733
1728
// use the `<Self as ..>` syntax in the error.
@@ -1762,6 +1757,7 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
1762
1757
) ;
1763
1758
return Ty :: new_error ( tcx, reported) ;
1764
1759
} ;
1760
+ debug ! ( ?self_ty) ;
1765
1761
1766
1762
let trait_ref = self . lower_path_to_mono_trait_ref (
1767
1763
span,
@@ -1771,6 +1767,7 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
1771
1767
false ,
1772
1768
constness,
1773
1769
) ;
1770
+ debug ! ( ?trait_ref) ;
1774
1771
1775
1772
let item_args =
1776
1773
self . lower_args_for_assoc_item ( span, item_def_id, item_segment, trait_ref. args ) ;
@@ -2024,13 +2021,10 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
2024
2021
hir_id : hir:: HirId ,
2025
2022
permit_variants : bool ,
2026
2023
) -> Ty < ' tcx > {
2024
+ let _guard = tracing:: debug_span!( "lower_res_to_ty" ) . entered ( ) ;
2025
+ debug ! ( ?path. res, ?opt_self_ty, ?path. segments) ;
2027
2026
let tcx = self . tcx ( ) ;
2028
2027
2029
- debug ! (
2030
- "res_to_ty(res={:?}, opt_self_ty={:?}, path_segments={:?})" ,
2031
- path. res, opt_self_ty, path. segments
2032
- ) ;
2033
-
2034
2028
let span = path. span ;
2035
2029
match path. res {
2036
2030
Res :: Def ( DefKind :: OpaqueTy , did) => {
@@ -2555,12 +2549,11 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
2555
2549
lifetimes : & [ hir:: GenericArg < ' _ > ] ,
2556
2550
in_trait : bool ,
2557
2551
) -> Ty < ' tcx > {
2558
- debug ! ( "impl_trait_ty_to_ty(def_id={:?}, lifetimes={:?})" , def_id, lifetimes) ;
2559
2552
let tcx = self . tcx ( ) ;
2560
2553
2561
2554
let generics = tcx. generics_of ( def_id) ;
2555
+ debug ! ( ?generics) ;
2562
2556
2563
- debug ! ( "impl_trait_ty_to_ty: generics={:?}" , generics) ;
2564
2557
let args = ty:: GenericArgs :: for_item ( tcx, def_id, |param, _| {
2565
2558
// We use `generics.count() - lifetimes.len()` here instead of `generics.parent_count`
2566
2559
// since return-position impl trait in trait squashes all of the generics from its source fn
@@ -2586,7 +2579,7 @@ impl<'o, 'tcx> dyn HirLowerer<'tcx> + 'o {
2586
2579
tcx. mk_param_from_def ( param)
2587
2580
}
2588
2581
} ) ;
2589
- debug ! ( "impl_trait_ty_to_ty: args={:?}" , args) ;
2582
+ debug ! ( ? args) ;
2590
2583
2591
2584
if in_trait {
2592
2585
Ty :: new_projection ( tcx, def_id, args)
0 commit comments