@@ -1193,11 +1193,7 @@ fn check_item_type(tcx: TyCtxt<'_>, item_id: LocalDefId, ty_span: Span, allow_fo
1193
1193
}
1194
1194
}
1195
1195
1196
- wfcx. register_wf_obligation (
1197
- ty_span,
1198
- Some ( WellFormedLoc :: Ty ( item_id) ) ,
1199
- item_ty. into ( ) ,
1200
- ) ;
1196
+ wfcx. register_wf_obligation ( ty_span, Some ( WellFormedLoc :: Ty ( item_id) ) , item_ty. into ( ) ) ;
1201
1197
if forbid_unsized {
1202
1198
wfcx. register_bound (
1203
1199
traits:: ObligationCause :: new ( ty_span, wfcx. body_id , traits:: WellFormed ( None ) ) ,
@@ -1306,11 +1302,7 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
1306
1302
// parameter includes another (e.g., `<T, U = T>`). In those cases, we can't
1307
1303
// be sure if it will error or not as user might always specify the other.
1308
1304
if !ty. needs_subst ( ) {
1309
- wfcx. register_wf_obligation (
1310
- tcx. def_span ( param. def_id ) ,
1311
- None ,
1312
- ty. into ( ) ,
1313
- ) ;
1305
+ wfcx. register_wf_obligation ( tcx. def_span ( param. def_id ) , None , ty. into ( ) ) ;
1314
1306
}
1315
1307
}
1316
1308
}
@@ -1454,7 +1446,13 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
1454
1446
assert_eq ! ( predicates. predicates. len( ) , predicates. spans. len( ) ) ;
1455
1447
let wf_obligations =
1456
1448
iter:: zip ( & predicates. predicates , & predicates. spans ) . flat_map ( |( & p, & sp) | {
1457
- traits:: wf:: predicate_obligations ( infcx, wfcx. param_env . without_const ( ) , wfcx. body_id , p, sp)
1449
+ traits:: wf:: predicate_obligations (
1450
+ infcx,
1451
+ wfcx. param_env . without_const ( ) ,
1452
+ wfcx. body_id ,
1453
+ p,
1454
+ sp,
1455
+ )
1458
1456
} ) ;
1459
1457
1460
1458
let obligations: Vec < _ > = wf_obligations. chain ( default_obligations) . collect ( ) ;
@@ -1509,11 +1507,7 @@ fn check_fn_or_method<'tcx>(
1509
1507
) ;
1510
1508
}
1511
1509
1512
- wfcx. register_wf_obligation (
1513
- hir_decl. output . span ( ) ,
1514
- None ,
1515
- sig. output ( ) . into ( ) ,
1516
- ) ;
1510
+ wfcx. register_wf_obligation ( hir_decl. output . span ( ) , None , sig. output ( ) . into ( ) ) ;
1517
1511
1518
1512
check_where_clauses ( wfcx, span, def_id) ;
1519
1513
}
0 commit comments