@@ -708,7 +708,6 @@ impl<'a> InferenceContext<'a> {
708708 tuple_field_access_types : _,
709709 coercion_casts,
710710 } = & mut result;
711-
712711 table. fallback_if_possible ( ) ;
713712
714713 // Comment from rustc:
@@ -754,7 +753,7 @@ impl<'a> InferenceContext<'a> {
754753 * has_errors = * has_errors || ty. contains_unknown ( ) ;
755754 }
756755
757- * has_errors = !type_mismatches. is_empty ( ) ;
756+ * has_errors | = !type_mismatches. is_empty ( ) ;
758757
759758 type_mismatches. retain ( |_, mismatch| {
760759 mismatch. expected = table. resolve_completely ( mismatch. expected . clone ( ) ) ;
@@ -797,20 +796,30 @@ impl<'a> InferenceContext<'a> {
797796 } ) ;
798797 for ( _, subst) in method_resolutions. values_mut ( ) {
799798 * subst = table. resolve_completely ( subst. clone ( ) ) ;
799+ * has_errors =
800+ * has_errors || subst. type_parameters ( Interner ) . any ( |ty| ty. contains_unknown ( ) ) ;
800801 }
801802 for ( _, subst) in assoc_resolutions. values_mut ( ) {
802803 * subst = table. resolve_completely ( subst. clone ( ) ) ;
804+ * has_errors =
805+ * has_errors || subst. type_parameters ( Interner ) . any ( |ty| ty. contains_unknown ( ) ) ;
803806 }
804807 for adjustment in expr_adjustments. values_mut ( ) . flatten ( ) {
805808 adjustment. target = table. resolve_completely ( adjustment. target . clone ( ) ) ;
809+ * has_errors = * has_errors || adjustment. target . contains_unknown ( ) ;
806810 }
807811 for adjustment in pat_adjustments. values_mut ( ) . flatten ( ) {
808812 * adjustment = table. resolve_completely ( adjustment. clone ( ) ) ;
813+ * has_errors = * has_errors || adjustment. contains_unknown ( ) ;
809814 }
810815 result. tuple_field_access_types = tuple_field_accesses_rev
811816 . into_iter ( )
812817 . enumerate ( )
813818 . map ( |( idx, subst) | ( TupleId ( idx as u32 ) , table. resolve_completely ( subst) ) )
819+ . inspect ( |( _, subst) | {
820+ * has_errors =
821+ * has_errors || subst. type_parameters ( Interner ) . any ( |ty| ty. contains_unknown ( ) ) ;
822+ } )
814823 . collect ( ) ;
815824 result
816825 }
0 commit comments