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