@@ -149,11 +149,11 @@ fn check_well_formed(tcx: TyCtxt<'_>, def_id: hir::OwnerId) {
149149/// We do this check as a pre-pass before checking fn bodies because if these constraints are
150150/// not included it frequently leads to confusing errors in fn bodies. So it's better to check
151151/// the types first.
152- #[ instrument( skip( tcx) , level = "debug " ) ]
152+ #[ instrument( skip( tcx) , level = "trace " ) ]
153153fn check_item < ' tcx > ( tcx : TyCtxt < ' tcx > , item : & ' tcx hir:: Item < ' tcx > ) {
154154 let def_id = item. owner_id . def_id ;
155155
156- debug ! (
156+ trace ! (
157157 ?item. owner_id,
158158 item. name = ? tcx. def_path_str( def_id)
159159 ) ;
@@ -249,7 +249,7 @@ fn check_item<'tcx>(tcx: TyCtxt<'tcx>, item: &'tcx hir::Item<'tcx>) {
249249fn check_foreign_item ( tcx : TyCtxt < ' _ > , item : & hir:: ForeignItem < ' _ > ) {
250250 let def_id = item. owner_id . def_id ;
251251
252- debug ! (
252+ trace ! (
253253 ?item. owner_id,
254254 item. name = ? tcx. def_path_str( def_id)
255255 ) ;
@@ -405,7 +405,7 @@ fn check_gat_where_clauses(tcx: TyCtxt<'_>, associated_items: &[hir::TraitItemRe
405405
406406 for ( gat_def_id, required_bounds) in required_bounds_by_item {
407407 let gat_item_hir = tcx. hir ( ) . expect_trait_item ( gat_def_id. def_id ) ;
408- debug ! ( ?required_bounds) ;
408+ trace ! ( ?required_bounds) ;
409409 let param_env = tcx. param_env ( gat_def_id) ;
410410
411411 let mut unsatisfied_bounds: Vec < _ > = required_bounds
@@ -546,8 +546,8 @@ fn gather_gat_bounds<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
546546 for ( ty, ty_idx) in & types {
547547 // In our example, requires that `Self: 'a`
548548 if ty_known_to_outlive ( tcx, item_def_id. def_id , param_env, & wf_tys, * ty, * region_a) {
549- debug ! ( ?ty_idx, ?region_a_idx) ;
550- debug ! ( "required clause: {ty} must outlive {region_a}" ) ;
549+ trace ! ( ?ty_idx, ?region_a_idx) ;
550+ trace ! ( "required clause: {ty} must outlive {region_a}" ) ;
551551 // Translate into the generic parameters of the GAT. In
552552 // our example, the type was `Self`, which will also be
553553 // `Self` in the GAT.
@@ -592,8 +592,8 @@ fn gather_gat_bounds<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
592592 * region_a,
593593 * region_b,
594594 ) {
595- debug ! ( ?region_a_idx, ?region_b_idx) ;
596- debug ! ( "required clause: {region_a} must outlive {region_b}" ) ;
595+ trace ! ( ?region_a_idx, ?region_b_idx) ;
596+ trace ! ( "required clause: {region_a} must outlive {region_b}" ) ;
597597 // Translate into the generic parameters of the GAT.
598598 let region_a_param = gat_generics. param_at ( * region_a_idx, tcx) ;
599599 let region_a_param = ty:: Region :: new_early_bound (
@@ -690,7 +690,7 @@ fn resolve_regions_with_wf_tys<'tcx>(
690690 add_constraints ( & infcx, region_bound_pairs) ;
691691
692692 let errors = infcx. resolve_regions ( & outlives_environment) ;
693- debug ! ( ?errors, "errors" ) ;
693+ trace ! ( ?errors, "errors" ) ;
694694
695695 // If we were able to prove that the type outlives the region without
696696 // an error, it must be because of the implied or explicit bounds...
@@ -950,7 +950,7 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) {
950950 }
951951}
952952
953- #[ instrument( level = "debug " , skip( tcx, span, sig_if_method) ) ]
953+ #[ instrument( level = "trace " , skip( tcx, span, sig_if_method) ) ]
954954fn check_associated_item (
955955 tcx : TyCtxt < ' _ > ,
956956 item_id : LocalDefId ,
@@ -1100,7 +1100,7 @@ fn check_type_defn<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item<'tcx>, all_sized: b
11001100
11011101#[ instrument( skip( tcx, item) ) ]
11021102fn check_trait ( tcx : TyCtxt < ' _ > , item : & hir:: Item < ' _ > ) {
1103- debug ! ( ?item. owner_id) ;
1103+ trace ! ( ?item. owner_id) ;
11041104
11051105 let def_id = item. owner_id . def_id ;
11061106 let trait_def = tcx. trait_def ( def_id) ;
@@ -1135,7 +1135,7 @@ fn check_trait(tcx: TyCtxt<'_>, item: &hir::Item<'_>) {
11351135fn check_associated_type_bounds ( wfcx : & WfCheckingCtxt < ' _ , ' _ > , item : ty:: AssocItem , span : Span ) {
11361136 let bounds = wfcx. tcx ( ) . explicit_item_bounds ( item. def_id ) ;
11371137
1138- debug ! ( "check_associated_type_bounds: bounds={:?}" , bounds) ;
1138+ trace ! ( "check_associated_type_bounds: bounds={:?}" , bounds) ;
11391139 let wf_obligations = bounds. subst_identity_iter_copied ( ) . flat_map ( |( bound, bound_span) | {
11401140 let normalized_bound = wfcx. normalize ( span, None , bound) ;
11411141 traits:: wf:: predicate_obligations (
@@ -1164,7 +1164,7 @@ fn check_item_fn(
11641164}
11651165
11661166fn check_item_type ( tcx : TyCtxt < ' _ > , item_id : LocalDefId , ty_span : Span , allow_foreign_ty : bool ) {
1167- debug ! ( "check_item_type: {:?}" , item_id) ;
1167+ trace ! ( "check_item_type: {:?}" , item_id) ;
11681168
11691169 enter_wf_checking_ctxt ( tcx, ty_span, item_id, |wfcx| {
11701170 let ty = tcx. type_of ( item_id) . subst_identity ( ) ;
@@ -1205,7 +1205,7 @@ fn check_item_type(tcx: TyCtxt<'_>, item_id: LocalDefId, ty_span: Span, allow_fo
12051205 } ) ;
12061206}
12071207
1208- #[ instrument( level = "debug " , skip( tcx, ast_self_ty, ast_trait_ref) ) ]
1208+ #[ instrument( level = "trace " , skip( tcx, ast_self_ty, ast_trait_ref) ) ]
12091209fn check_impl < ' tcx > (
12101210 tcx : TyCtxt < ' tcx > ,
12111211 item : & ' tcx hir:: Item < ' tcx > ,
@@ -1248,7 +1248,7 @@ fn check_impl<'tcx>(
12481248 obligation. cause . span = ast_self_ty. span ;
12491249 }
12501250 }
1251- debug ! ( ?obligations) ;
1251+ trace ! ( ?obligations) ;
12521252 wfcx. register_obligations ( obligations) ;
12531253 }
12541254 None => {
@@ -1271,7 +1271,7 @@ fn check_impl<'tcx>(
12711271}
12721272
12731273/// Checks where-clauses and inline bounds that are declared on `def_id`.
1274- #[ instrument( level = "debug " , skip( wfcx) ) ]
1274+ #[ instrument( level = "trace " , skip( wfcx) ) ]
12751275fn check_where_clauses < ' tcx > ( wfcx : & WfCheckingCtxt < ' _ , ' tcx > , span : Span , def_id : LocalDefId ) {
12761276 let infcx = wfcx. infcx ;
12771277 let tcx = wfcx. tcx ( ) ;
@@ -1443,7 +1443,7 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
14431443
14441444 let predicates = wfcx. normalize ( span, None , predicates) ;
14451445
1446- debug ! ( ?predicates. predicates) ;
1446+ trace ! ( ?predicates. predicates) ;
14471447 assert_eq ! ( predicates. predicates. len( ) , predicates. spans. len( ) ) ;
14481448 let wf_obligations = predicates. into_iter ( ) . flat_map ( |( p, sp) | {
14491449 traits:: wf:: predicate_obligations (
@@ -1458,7 +1458,7 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
14581458 wfcx. register_obligations ( obligations) ;
14591459}
14601460
1461- #[ instrument( level = "debug " , skip( wfcx, span, hir_decl) ) ]
1461+ #[ instrument( level = "trace " , skip( wfcx, span, hir_decl) ) ]
14621462fn check_fn_or_method < ' tcx > (
14631463 wfcx : & WfCheckingCtxt < ' _ , ' tcx > ,
14641464 span : Span ,
@@ -1621,7 +1621,7 @@ const HELP_FOR_SELF_TYPE: &str = "consider changing to `self`, `&self`, `&mut se
16211621 `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one \
16221622 of the previous types except `Self`)";
16231623
1624- #[ instrument( level = "debug " , skip( wfcx) ) ]
1624+ #[ instrument( level = "trace " , skip( wfcx) ) ]
16251625fn check_method_receiver < ' tcx > (
16261626 wfcx : & WfCheckingCtxt < ' _ , ' tcx > ,
16271627 fn_sig : & hir:: FnSig < ' _ > ,
@@ -1640,7 +1640,7 @@ fn check_method_receiver<'tcx>(
16401640 let sig = tcx. liberate_late_bound_regions ( method. def_id , sig) ;
16411641 let sig = wfcx. normalize ( span, None , sig) ;
16421642
1643- debug ! ( "check_method_receiver: sig={:?}" , sig) ;
1643+ trace ! ( "check_method_receiver: sig={:?}" , sig) ;
16441644
16451645 let self_ty = wfcx. normalize ( span, None , self_ty) ;
16461646
@@ -1733,9 +1733,10 @@ fn receiver_is_valid<'tcx>(
17331733 // Keep dereferencing `receiver_ty` until we get to `self_ty`.
17341734 loop {
17351735 if let Some ( ( potential_self_ty, _) ) = autoderef. next ( ) {
1736- debug ! (
1736+ trace ! (
17371737 "receiver_is_valid: potential self type `{:?}` to match `{:?}`" ,
1738- potential_self_ty, self_ty
1738+ potential_self_ty,
1739+ self_ty
17391740 ) ;
17401741
17411742 if can_eq_self ( potential_self_ty) {
@@ -1764,7 +1765,7 @@ fn receiver_is_valid<'tcx>(
17641765 }
17651766 }
17661767 } else {
1767- debug ! ( "receiver_is_valid: type `{:?}` does not deref to `{:?}`" , receiver_ty, self_ty) ;
1768+ trace ! ( "receiver_is_valid: type `{:?}` does not deref to `{:?}`" , receiver_ty, self_ty) ;
17681769 // If the receiver already has errors reported due to it, consider it valid to avoid
17691770 // unnecessary errors (#58712).
17701771 return receiver_ty. references_error ( ) ;
@@ -1795,7 +1796,7 @@ fn receiver_is_implemented<'tcx>(
17951796 if wfcx. infcx . predicate_must_hold_modulo_regions ( & obligation) {
17961797 true
17971798 } else {
1798- debug ! (
1799+ trace ! (
17991800 "receiver_is_implemented: type `{:?}` does not implement `Receiver` trait" ,
18001801 receiver_ty
18011802 ) ;
@@ -1897,7 +1898,7 @@ fn report_bivariance(
18971898impl < ' tcx > WfCheckingCtxt < ' _ , ' tcx > {
18981899 /// Feature gates RFC 2056 -- trivial bounds, checking for global bounds that
18991900 /// aren't true.
1900- #[ instrument( level = "debug " , skip( self ) ) ]
1901+ #[ instrument( level = "trace " , skip( self ) ) ]
19011902 fn check_false_global_bounds ( & mut self ) {
19021903 let tcx = self . ocx . infcx . tcx ;
19031904 let mut span = self . span ;
0 commit comments