@@ -59,7 +59,7 @@ pub(super) fn find_opaque_ty_constraints_for_impl_trait_in_assoc_type(
5959 if !hidden. ty . references_error ( ) {
6060 for concrete_type in locator. typeck_types {
6161 if concrete_type. ty != tcx. erase_regions ( hidden. ty ) {
62- if let Ok ( d) = hidden. report_mismatch ( & concrete_type, def_id, tcx) {
62+ if let Ok ( d) = hidden. build_mismatch_error ( & concrete_type, def_id, tcx) {
6363 d. emit ( ) ;
6464 }
6565 }
@@ -135,7 +135,7 @@ pub(super) fn find_opaque_ty_constraints_for_tait(tcx: TyCtxt<'_>, def_id: Local
135135 if !hidden. ty . references_error ( ) {
136136 for concrete_type in locator. typeck_types {
137137 if concrete_type. ty != tcx. erase_regions ( hidden. ty ) {
138- if let Ok ( d) = hidden. report_mismatch ( & concrete_type, def_id, tcx) {
138+ if let Ok ( d) = hidden. build_mismatch_error ( & concrete_type, def_id, tcx) {
139139 d. emit ( ) ;
140140 }
141141 }
@@ -289,7 +289,7 @@ impl TaitConstraintLocator<'_> {
289289 if let Some ( prev) = & mut self . found {
290290 if concrete_type. ty != prev. ty {
291291 let ( Ok ( guar) | Err ( guar) ) = prev
292- . report_mismatch ( & concrete_type, self . def_id , self . tcx )
292+ . build_mismatch_error ( & concrete_type, self . def_id , self . tcx )
293293 . map ( |d| d. emit ( ) ) ;
294294 prev. ty = Ty :: new_error ( self . tcx , guar) ;
295295 }
@@ -364,7 +364,7 @@ pub(super) fn find_opaque_ty_constraints_for_rpit<'tcx>(
364364 ) ;
365365 if let Some ( prev) = & mut hir_opaque_ty {
366366 if concrete_type. ty != prev. ty {
367- if let Ok ( d) = prev. report_mismatch ( & concrete_type, def_id, tcx) {
367+ if let Ok ( d) = prev. build_mismatch_error ( & concrete_type, def_id, tcx) {
368368 d. stash (
369369 tcx. def_span ( opaque_type_key. def_id ) ,
370370 StashKey :: OpaqueHiddenTypeMismatch ,
@@ -441,7 +441,9 @@ impl RpitConstraintChecker<'_> {
441441 debug ! ( ?concrete_type, "found constraint" ) ;
442442
443443 if concrete_type. ty != self . found . ty {
444- if let Ok ( d) = self . found . report_mismatch ( & concrete_type, self . def_id , self . tcx ) {
444+ if let Ok ( d) =
445+ self . found . build_mismatch_error ( & concrete_type, self . def_id , self . tcx )
446+ {
445447 d. emit ( ) ;
446448 }
447449 }
0 commit comments