@@ -1046,7 +1046,7 @@ fn check_associated_item(
10461046
10471047 // Avoid bogus "type annotations needed `Foo: Bar`" errors on `impl Bar for Foo` in case
10481048 // other `Foo` impls are incoherent.
1049- tcx. ensure ( )
1049+ tcx. ensure_ok ( )
10501050 . coherent_trait ( tcx. parent ( item. trait_item_def_id . unwrap_or ( item_id. into ( ) ) ) ) ?;
10511051
10521052 let self_ty = match item. container {
@@ -1354,7 +1354,7 @@ fn check_impl<'tcx>(
13541354 let trait_ref = tcx. impl_trait_ref ( item. owner_id ) . unwrap ( ) . instantiate_identity ( ) ;
13551355 // Avoid bogus "type annotations needed `Foo: Bar`" errors on `impl Bar for Foo` in case
13561356 // other `Foo` impls are incoherent.
1357- tcx. ensure ( ) . coherent_trait ( trait_ref. def_id ) ?;
1357+ tcx. ensure_ok ( ) . coherent_trait ( trait_ref. def_id ) ?;
13581358 let trait_span = hir_trait_ref. path . span ;
13591359 let trait_ref = wfcx. normalize (
13601360 trait_span,
@@ -2268,11 +2268,13 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
22682268fn check_mod_type_wf ( tcx : TyCtxt < ' _ > , module : LocalModDefId ) -> Result < ( ) , ErrorGuaranteed > {
22692269 let items = tcx. hir_module_items ( module) ;
22702270 let res = items
2271- . par_items ( |item| tcx. ensure ( ) . check_well_formed ( item. owner_id . def_id ) )
2272- . and ( items. par_impl_items ( |item| tcx. ensure ( ) . check_well_formed ( item. owner_id . def_id ) ) )
2273- . and ( items. par_trait_items ( |item| tcx. ensure ( ) . check_well_formed ( item. owner_id . def_id ) ) )
2274- . and ( items. par_foreign_items ( |item| tcx. ensure ( ) . check_well_formed ( item. owner_id . def_id ) ) )
2275- . and ( items. par_opaques ( |item| tcx. ensure ( ) . check_well_formed ( item) ) ) ;
2271+ . par_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) )
2272+ . and ( items. par_impl_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) ) )
2273+ . and ( items. par_trait_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) ) )
2274+ . and (
2275+ items. par_foreign_items ( |item| tcx. ensure_ok ( ) . check_well_formed ( item. owner_id . def_id ) ) ,
2276+ )
2277+ . and ( items. par_opaques ( |item| tcx. ensure_ok ( ) . check_well_formed ( item) ) ) ;
22762278 if module == LocalModDefId :: CRATE_DEF_ID {
22772279 super :: entry:: check_for_entry_fn ( tcx) ;
22782280 }
0 commit comments