@@ -421,11 +421,11 @@ fn mir_promoted(
421
421
} ;
422
422
423
423
// the `has_ffi_unwind_calls` query uses the raw mir, so make sure it is run.
424
- tcx. ensure_with_value ( ) . has_ffi_unwind_calls ( def) ;
424
+ tcx. ensure_done ( ) . has_ffi_unwind_calls ( def) ;
425
425
426
426
// the `by_move_body` query uses the raw mir, so make sure it is run.
427
427
if tcx. needs_coroutine_by_move_body_def_id ( def. to_def_id ( ) ) {
428
- tcx. ensure_with_value ( ) . coroutine_by_move_body_def_id ( def) ;
428
+ tcx. ensure_done ( ) . coroutine_by_move_body_def_id ( def) ;
429
429
}
430
430
431
431
let mut body = tcx. mir_built ( def) . steal ( ) ;
@@ -488,7 +488,7 @@ fn inner_mir_for_ctfe(tcx: TyCtxt<'_>, def: LocalDefId) -> Body<'_> {
488
488
/// end up missing the source MIR due to stealing happening.
489
489
fn mir_drops_elaborated_and_const_checked ( tcx : TyCtxt < ' _ > , def : LocalDefId ) -> & Steal < Body < ' _ > > {
490
490
if tcx. is_coroutine ( def. to_def_id ( ) ) {
491
- tcx. ensure_with_value ( ) . mir_coroutine_witnesses ( def) ;
491
+ tcx. ensure_done ( ) . mir_coroutine_witnesses ( def) ;
492
492
}
493
493
494
494
// We only need to borrowck non-synthetic MIR.
@@ -501,7 +501,7 @@ fn mir_drops_elaborated_and_const_checked(tcx: TyCtxt<'_>, def: LocalDefId) -> &
501
501
if pm:: should_run_pass ( tcx, & inline:: Inline , pm:: Optimizations :: Allowed )
502
502
|| inline:: ForceInline :: should_run_pass_for_callee ( tcx, def. to_def_id ( ) )
503
503
{
504
- tcx. ensure_with_value ( ) . mir_inliner_callees ( ty:: InstanceKind :: Item ( def. to_def_id ( ) ) ) ;
504
+ tcx. ensure_done ( ) . mir_inliner_callees ( ty:: InstanceKind :: Item ( def. to_def_id ( ) ) ) ;
505
505
}
506
506
}
507
507
@@ -733,7 +733,7 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
733
733
// Run the `mir_for_ctfe` query, which depends on `mir_drops_elaborated_and_const_checked`
734
734
// which we are going to steal below. Thus we need to run `mir_for_ctfe` first, so it
735
735
// computes and caches its result.
736
- Some ( hir:: ConstContext :: ConstFn ) => tcx. ensure_with_value ( ) . mir_for_ctfe ( did) ,
736
+ Some ( hir:: ConstContext :: ConstFn ) => tcx. ensure_done ( ) . mir_for_ctfe ( did) ,
737
737
None => { }
738
738
Some ( other) => panic ! ( "do not use `optimized_mir` for constants: {other:?}" ) ,
739
739
}
@@ -772,7 +772,7 @@ fn promoted_mir(tcx: TyCtxt<'_>, def: LocalDefId) -> &IndexVec<Promoted, Body<'_
772
772
}
773
773
774
774
if !tcx. is_synthetic_mir ( def) {
775
- tcx. ensure_with_value ( ) . mir_borrowck ( def) ;
775
+ tcx. ensure_done ( ) . mir_borrowck ( def) ;
776
776
}
777
777
let mut promoted = tcx. mir_promoted ( def) . 1 . steal ( ) ;
778
778
0 commit comments