@@ -1419,6 +1419,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
14191419
14201420 // returns if `cond` not occurring implies that `error` does not occur - i.e., that
14211421 // `error` occurring implies that `cond` occurs.
1422+ #[ instrument( level = "debug" , skip( self ) , ret) ]
14221423 fn error_implies ( & self , cond : ty:: Predicate < ' tcx > , error : ty:: Predicate < ' tcx > ) -> bool {
14231424 if cond == error {
14241425 return true ;
@@ -1428,25 +1429,13 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
14281429 self . enter_forall ( error, |error| {
14291430 elaborate ( self . tcx , std:: iter:: once ( cond) )
14301431 . 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) )
14381433 } )
14391434 } else if let Some ( error) = error. to_opt_poly_projection_pred ( ) {
14401435 self . enter_forall ( error, |error| {
14411436 elaborate ( self . tcx , std:: iter:: once ( cond) )
14421437 . 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) )
14501439 } )
14511440 } else {
14521441 false
0 commit comments