@@ -1419,6 +1419,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1419
1419
1420
1420
// returns if `cond` not occurring implies that `error` does not occur - i.e., that
1421
1421
// `error` occurring implies that `cond` occurs.
1422
+ #[ instrument( level = "debug" , skip( self ) , ret) ]
1422
1423
fn error_implies ( & self , cond : ty:: Predicate < ' tcx > , error : ty:: Predicate < ' tcx > ) -> bool {
1423
1424
if cond == error {
1424
1425
return true ;
@@ -1428,25 +1429,13 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1428
1429
self . enter_forall ( error, |error| {
1429
1430
elaborate ( self . tcx , std:: iter:: once ( cond) )
1430
1431
. filter_map ( |implied| implied. to_opt_poly_trait_pred ( ) )
1431
- . any ( |implied| {
1432
- let is_implied = self . can_match_trait ( error, implied) ;
1433
- if is_implied {
1434
- debug ! ( "error_implies: {:?} -> {:?} -> {:?}" , cond, error, implied) ;
1435
- }
1436
- is_implied
1437
- } )
1432
+ . any ( |implied| self . can_match_trait ( error, implied) )
1438
1433
} )
1439
1434
} else if let Some ( error) = error. to_opt_poly_projection_pred ( ) {
1440
1435
self . enter_forall ( error, |error| {
1441
1436
elaborate ( self . tcx , std:: iter:: once ( cond) )
1442
1437
. filter_map ( |implied| implied. to_opt_poly_projection_pred ( ) )
1443
- . any ( |implied| {
1444
- let is_implied = self . can_match_projection ( error, implied) ;
1445
- if is_implied {
1446
- debug ! ( "error_implies: {:?} -> {:?} -> {:?}" , cond, error, implied) ;
1447
- }
1448
- is_implied
1449
- } )
1438
+ . any ( |implied| self . can_match_projection ( error, implied) )
1450
1439
} )
1451
1440
} else {
1452
1441
false
0 commit comments