@@ -149,11 +149,11 @@ fn check_well_formed(tcx: TyCtxt<'_>, def_id: hir::OwnerId) {
149
149
/// We do this check as a pre-pass before checking fn bodies because if these constraints are
150
150
/// not included it frequently leads to confusing errors in fn bodies. So it's better to check
151
151
/// the types first.
152
- #[ instrument( skip( tcx) , level = "debug " ) ]
152
+ #[ instrument( skip( tcx) , level = "trace " ) ]
153
153
fn check_item < ' tcx > ( tcx : TyCtxt < ' tcx > , item : & ' tcx hir:: Item < ' tcx > ) {
154
154
let def_id = item. owner_id . def_id ;
155
155
156
- debug ! (
156
+ trace ! (
157
157
?item. owner_id,
158
158
item. name = ? tcx. def_path_str( def_id)
159
159
) ;
@@ -249,7 +249,7 @@ fn check_item<'tcx>(tcx: TyCtxt<'tcx>, item: &'tcx hir::Item<'tcx>) {
249
249
fn check_foreign_item ( tcx : TyCtxt < ' _ > , item : & hir:: ForeignItem < ' _ > ) {
250
250
let def_id = item. owner_id . def_id ;
251
251
252
- debug ! (
252
+ trace ! (
253
253
?item. owner_id,
254
254
item. name = ? tcx. def_path_str( def_id)
255
255
) ;
@@ -405,7 +405,7 @@ fn check_gat_where_clauses(tcx: TyCtxt<'_>, associated_items: &[hir::TraitItemRe
405
405
406
406
for ( gat_def_id, required_bounds) in required_bounds_by_item {
407
407
let gat_item_hir = tcx. hir ( ) . expect_trait_item ( gat_def_id. def_id ) ;
408
- debug ! ( ?required_bounds) ;
408
+ trace ! ( ?required_bounds) ;
409
409
let param_env = tcx. param_env ( gat_def_id) ;
410
410
411
411
let mut unsatisfied_bounds: Vec < _ > = required_bounds
@@ -546,8 +546,8 @@ fn gather_gat_bounds<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
546
546
for ( ty, ty_idx) in & types {
547
547
// In our example, requires that `Self: 'a`
548
548
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}" ) ;
551
551
// Translate into the generic parameters of the GAT. In
552
552
// our example, the type was `Self`, which will also be
553
553
// `Self` in the GAT.
@@ -592,8 +592,8 @@ fn gather_gat_bounds<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
592
592
* region_a,
593
593
* region_b,
594
594
) {
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}" ) ;
597
597
// Translate into the generic parameters of the GAT.
598
598
let region_a_param = gat_generics. param_at ( * region_a_idx, tcx) ;
599
599
let region_a_param = ty:: Region :: new_early_bound (
@@ -690,7 +690,7 @@ fn resolve_regions_with_wf_tys<'tcx>(
690
690
add_constraints ( & infcx, region_bound_pairs) ;
691
691
692
692
let errors = infcx. resolve_regions ( & outlives_environment) ;
693
- debug ! ( ?errors, "errors" ) ;
693
+ trace ! ( ?errors, "errors" ) ;
694
694
695
695
// If we were able to prove that the type outlives the region without
696
696
// 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<'_>) {
950
950
}
951
951
}
952
952
953
- #[ instrument( level = "debug " , skip( tcx, span, sig_if_method) ) ]
953
+ #[ instrument( level = "trace " , skip( tcx, span, sig_if_method) ) ]
954
954
fn check_associated_item (
955
955
tcx : TyCtxt < ' _ > ,
956
956
item_id : LocalDefId ,
@@ -1100,7 +1100,7 @@ fn check_type_defn<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item<'tcx>, all_sized: b
1100
1100
1101
1101
#[ instrument( skip( tcx, item) ) ]
1102
1102
fn check_trait ( tcx : TyCtxt < ' _ > , item : & hir:: Item < ' _ > ) {
1103
- debug ! ( ?item. owner_id) ;
1103
+ trace ! ( ?item. owner_id) ;
1104
1104
1105
1105
let def_id = item. owner_id . def_id ;
1106
1106
let trait_def = tcx. trait_def ( def_id) ;
@@ -1135,7 +1135,7 @@ fn check_trait(tcx: TyCtxt<'_>, item: &hir::Item<'_>) {
1135
1135
fn check_associated_type_bounds ( wfcx : & WfCheckingCtxt < ' _ , ' _ > , item : ty:: AssocItem , span : Span ) {
1136
1136
let bounds = wfcx. tcx ( ) . explicit_item_bounds ( item. def_id ) ;
1137
1137
1138
- debug ! ( "check_associated_type_bounds: bounds={:?}" , bounds) ;
1138
+ trace ! ( "check_associated_type_bounds: bounds={:?}" , bounds) ;
1139
1139
let wf_obligations = bounds. subst_identity_iter_copied ( ) . flat_map ( |( bound, bound_span) | {
1140
1140
let normalized_bound = wfcx. normalize ( span, None , bound) ;
1141
1141
traits:: wf:: predicate_obligations (
@@ -1164,7 +1164,7 @@ fn check_item_fn(
1164
1164
}
1165
1165
1166
1166
fn 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) ;
1168
1168
1169
1169
enter_wf_checking_ctxt ( tcx, ty_span, item_id, |wfcx| {
1170
1170
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
1205
1205
} ) ;
1206
1206
}
1207
1207
1208
- #[ instrument( level = "debug " , skip( tcx, ast_self_ty, ast_trait_ref) ) ]
1208
+ #[ instrument( level = "trace " , skip( tcx, ast_self_ty, ast_trait_ref) ) ]
1209
1209
fn check_impl < ' tcx > (
1210
1210
tcx : TyCtxt < ' tcx > ,
1211
1211
item : & ' tcx hir:: Item < ' tcx > ,
@@ -1248,7 +1248,7 @@ fn check_impl<'tcx>(
1248
1248
obligation. cause . span = ast_self_ty. span ;
1249
1249
}
1250
1250
}
1251
- debug ! ( ?obligations) ;
1251
+ trace ! ( ?obligations) ;
1252
1252
wfcx. register_obligations ( obligations) ;
1253
1253
}
1254
1254
None => {
@@ -1271,7 +1271,7 @@ fn check_impl<'tcx>(
1271
1271
}
1272
1272
1273
1273
/// Checks where-clauses and inline bounds that are declared on `def_id`.
1274
- #[ instrument( level = "debug " , skip( wfcx) ) ]
1274
+ #[ instrument( level = "trace " , skip( wfcx) ) ]
1275
1275
fn check_where_clauses < ' tcx > ( wfcx : & WfCheckingCtxt < ' _ , ' tcx > , span : Span , def_id : LocalDefId ) {
1276
1276
let infcx = wfcx. infcx ;
1277
1277
let tcx = wfcx. tcx ( ) ;
@@ -1443,7 +1443,7 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
1443
1443
1444
1444
let predicates = wfcx. normalize ( span, None , predicates) ;
1445
1445
1446
- debug ! ( ?predicates. predicates) ;
1446
+ trace ! ( ?predicates. predicates) ;
1447
1447
assert_eq ! ( predicates. predicates. len( ) , predicates. spans. len( ) ) ;
1448
1448
let wf_obligations = predicates. into_iter ( ) . flat_map ( |( p, sp) | {
1449
1449
traits:: wf:: predicate_obligations (
@@ -1458,7 +1458,7 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
1458
1458
wfcx. register_obligations ( obligations) ;
1459
1459
}
1460
1460
1461
- #[ instrument( level = "debug " , skip( wfcx, span, hir_decl) ) ]
1461
+ #[ instrument( level = "trace " , skip( wfcx, span, hir_decl) ) ]
1462
1462
fn check_fn_or_method < ' tcx > (
1463
1463
wfcx : & WfCheckingCtxt < ' _ , ' tcx > ,
1464
1464
span : Span ,
@@ -1621,7 +1621,7 @@ const HELP_FOR_SELF_TYPE: &str = "consider changing to `self`, `&self`, `&mut se
1621
1621
`self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one \
1622
1622
of the previous types except `Self`)";
1623
1623
1624
- #[ instrument( level = "debug " , skip( wfcx) ) ]
1624
+ #[ instrument( level = "trace " , skip( wfcx) ) ]
1625
1625
fn check_method_receiver < ' tcx > (
1626
1626
wfcx : & WfCheckingCtxt < ' _ , ' tcx > ,
1627
1627
fn_sig : & hir:: FnSig < ' _ > ,
@@ -1640,7 +1640,7 @@ fn check_method_receiver<'tcx>(
1640
1640
let sig = tcx. liberate_late_bound_regions ( method. def_id , sig) ;
1641
1641
let sig = wfcx. normalize ( span, None , sig) ;
1642
1642
1643
- debug ! ( "check_method_receiver: sig={:?}" , sig) ;
1643
+ trace ! ( "check_method_receiver: sig={:?}" , sig) ;
1644
1644
1645
1645
let self_ty = wfcx. normalize ( span, None , self_ty) ;
1646
1646
@@ -1733,9 +1733,10 @@ fn receiver_is_valid<'tcx>(
1733
1733
// Keep dereferencing `receiver_ty` until we get to `self_ty`.
1734
1734
loop {
1735
1735
if let Some ( ( potential_self_ty, _) ) = autoderef. next ( ) {
1736
- debug ! (
1736
+ trace ! (
1737
1737
"receiver_is_valid: potential self type `{:?}` to match `{:?}`" ,
1738
- potential_self_ty, self_ty
1738
+ potential_self_ty,
1739
+ self_ty
1739
1740
) ;
1740
1741
1741
1742
if can_eq_self ( potential_self_ty) {
@@ -1764,7 +1765,7 @@ fn receiver_is_valid<'tcx>(
1764
1765
}
1765
1766
}
1766
1767
} 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) ;
1768
1769
// If the receiver already has errors reported due to it, consider it valid to avoid
1769
1770
// unnecessary errors (#58712).
1770
1771
return receiver_ty. references_error ( ) ;
@@ -1795,7 +1796,7 @@ fn receiver_is_implemented<'tcx>(
1795
1796
if wfcx. infcx . predicate_must_hold_modulo_regions ( & obligation) {
1796
1797
true
1797
1798
} else {
1798
- debug ! (
1799
+ trace ! (
1799
1800
"receiver_is_implemented: type `{:?}` does not implement `Receiver` trait" ,
1800
1801
receiver_ty
1801
1802
) ;
@@ -1897,7 +1898,7 @@ fn report_bivariance(
1897
1898
impl < ' tcx > WfCheckingCtxt < ' _ , ' tcx > {
1898
1899
/// Feature gates RFC 2056 -- trivial bounds, checking for global bounds that
1899
1900
/// aren't true.
1900
- #[ instrument( level = "debug " , skip( self ) ) ]
1901
+ #[ instrument( level = "trace " , skip( self ) ) ]
1901
1902
fn check_false_global_bounds ( & mut self ) {
1902
1903
let tcx = self . ocx . infcx . tcx ;
1903
1904
let mut span = self . span ;
0 commit comments