@@ -1044,7 +1044,7 @@ fn check_associated_item(
10441044
10451045 // Avoid bogus "type annotations needed `Foo: Bar`" errors on `impl Bar for Foo` in case
10461046 // other `Foo` impls are incoherent.
1047- tcx. ensure ( )
1047+ tcx. ensure_ok ( )
10481048 . coherent_trait ( tcx. parent ( item. trait_item_def_id . unwrap_or ( item_id. into ( ) ) ) ) ?;
10491049
10501050 let self_ty = match item. container {
@@ -1352,7 +1352,7 @@ fn check_impl<'tcx>(
13521352 let trait_ref = tcx. impl_trait_ref ( item. owner_id ) . unwrap ( ) . instantiate_identity ( ) ;
13531353 // Avoid bogus "type annotations needed `Foo: Bar`" errors on `impl Bar for Foo` in case
13541354 // other `Foo` impls are incoherent.
1355- tcx. ensure ( ) . coherent_trait ( trait_ref. def_id ) ?;
1355+ tcx. ensure_ok ( ) . coherent_trait ( trait_ref. def_id ) ?;
13561356 let trait_span = hir_trait_ref. path . span ;
13571357 let trait_ref = wfcx. normalize (
13581358 trait_span,
@@ -2265,14 +2265,15 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
22652265
22662266fn check_mod_type_wf ( tcx : TyCtxt < ' _ > , module : LocalModDefId ) -> Result < ( ) , ErrorGuaranteed > {
22672267 let items = tcx. hir_module_items ( module) ;
2268- let mut res = items. par_items ( |item| tcx. ensure ( ) . check_well_formed ( item. owner_id . def_id ) ) ;
2269- res =
2270- res. and ( items. par_impl_items ( |item| tcx. ensure ( ) . check_well_formed ( item. owner_id . def_id ) ) ) ;
2271- res =
2272- res. and ( items. par_trait_items ( |item| tcx. ensure ( ) . check_well_formed ( item. owner_id . def_id ) ) ) ;
2268+ let mut res = items. par_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) ) ;
22732269 res = res
2274- . and ( items. par_foreign_items ( |item| tcx. ensure ( ) . check_well_formed ( item. owner_id . def_id ) ) ) ;
2275- res = res. and ( items. par_opaques ( |item| tcx. ensure ( ) . check_well_formed ( item) ) ) ;
2270+ . and ( items. par_impl_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) ) ) ;
2271+ res = res
2272+ . and ( items. par_trait_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) ) ) ;
2273+ res = res. and (
2274+ items. par_foreign_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) ) ,
2275+ ) ;
2276+ res = res. and ( items. par_opaques ( |item| tcx. ensure_ok ( ) . check_well_formed ( item) ) ) ;
22762277 if module == LocalModDefId :: CRATE_DEF_ID {
22772278 super :: entry:: check_for_entry_fn ( tcx) ;
22782279 }
0 commit comments