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