@@ -1044,7 +1044,7 @@ fn check_associated_item(
1044
1044
1045
1045
// Avoid bogus "type annotations needed `Foo: Bar`" errors on `impl Bar for Foo` in case
1046
1046
// other `Foo` impls are incoherent.
1047
- tcx. ensure ( )
1047
+ tcx. ensure_ok ( )
1048
1048
. coherent_trait ( tcx. parent ( item. trait_item_def_id . unwrap_or ( item_id. into ( ) ) ) ) ?;
1049
1049
1050
1050
let self_ty = match item. container {
@@ -1352,7 +1352,7 @@ fn check_impl<'tcx>(
1352
1352
let trait_ref = tcx. impl_trait_ref ( item. owner_id ) . unwrap ( ) . instantiate_identity ( ) ;
1353
1353
// Avoid bogus "type annotations needed `Foo: Bar`" errors on `impl Bar for Foo` in case
1354
1354
// other `Foo` impls are incoherent.
1355
- tcx. ensure ( ) . coherent_trait ( trait_ref. def_id ) ?;
1355
+ tcx. ensure_ok ( ) . coherent_trait ( trait_ref. def_id ) ?;
1356
1356
let trait_span = hir_trait_ref. path . span ;
1357
1357
let trait_ref = wfcx. normalize (
1358
1358
trait_span,
@@ -2265,14 +2265,15 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
2265
2265
2266
2266
fn check_mod_type_wf ( tcx : TyCtxt < ' _ > , module : LocalModDefId ) -> Result < ( ) , ErrorGuaranteed > {
2267
2267
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 ) ) ;
2273
2269
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) ) ) ;
2276
2277
if module == LocalModDefId :: CRATE_DEF_ID {
2277
2278
super :: entry:: check_for_entry_fn ( tcx) ;
2278
2279
}
0 commit comments