File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -435,8 +435,9 @@ fn compute_hir_hash(
435435
436436pub fn lower_to_hir ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) -> hir:: Crate < ' _ > {
437437 let sess = tcx. sess ;
438- tcx. ensure ( ) . output_filenames ( ( ) ) ;
439- let _ = tcx. early_lint_checks ( ( ) ) ; // Borrows `resolver_for_lowering`.
438+ // Queries that borrow `resolver_for_lowering`.
439+ tcx. ensure_with_value ( ) . output_filenames ( ( ) ) ;
440+ tcx. ensure_with_value ( ) . early_lint_checks ( ( ) ) ;
440441 let ( mut resolver, krate) = tcx. resolver_for_lowering ( ( ) ) . steal ( ) ;
441442
442443 let ast_index = index_crate ( & resolver. node_id_to_def_id , & krate) ;
Original file line number Diff line number Diff line change @@ -2050,13 +2050,13 @@ fn prefetch_mir(tcx: TyCtxt<'_>) {
20502050 let ( encode_const, encode_opt) = should_encode_mir ( tcx, def_id) ;
20512051
20522052 if encode_const {
2053- tcx. ensure ( ) . mir_for_ctfe ( def_id) ;
2053+ tcx. ensure_with_value ( ) . mir_for_ctfe ( def_id) ;
20542054 }
20552055 if encode_opt {
2056- tcx. ensure ( ) . optimized_mir ( def_id) ;
2056+ tcx. ensure_with_value ( ) . optimized_mir ( def_id) ;
20572057 }
20582058 if encode_opt || encode_const {
2059- tcx. ensure ( ) . promoted_mir ( def_id) ;
2059+ tcx. ensure_with_value ( ) . promoted_mir ( def_id) ;
20602060 }
20612061 } )
20622062}
Original file line number Diff line number Diff line change @@ -444,7 +444,7 @@ fn mir_drops_elaborated_and_const_checked(
444444
445445 // Do not compute the mir call graph without said call graph actually being used.
446446 if inline:: Inline . is_enabled ( & tcx. sess ) {
447- let _ = tcx. mir_inliner_callees ( ty:: InstanceDef :: Item ( def) ) ;
447+ tcx. ensure_with_value ( ) . mir_inliner_callees ( ty:: InstanceDef :: Item ( def) ) ;
448448 }
449449 }
450450
You can’t perform that action at this time.
0 commit comments