File tree 3 files changed +7
-6
lines changed
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(
435
435
436
436
pub fn lower_to_hir ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) -> hir:: Crate < ' _ > {
437
437
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 ( ( ) ) ;
440
441
let ( mut resolver, krate) = tcx. resolver_for_lowering ( ( ) ) . steal ( ) ;
441
442
442
443
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<'_>) {
2050
2050
let ( encode_const, encode_opt) = should_encode_mir ( tcx, def_id) ;
2051
2051
2052
2052
if encode_const {
2053
- tcx. ensure ( ) . mir_for_ctfe ( def_id) ;
2053
+ tcx. ensure_with_value ( ) . mir_for_ctfe ( def_id) ;
2054
2054
}
2055
2055
if encode_opt {
2056
- tcx. ensure ( ) . optimized_mir ( def_id) ;
2056
+ tcx. ensure_with_value ( ) . optimized_mir ( def_id) ;
2057
2057
}
2058
2058
if encode_opt || encode_const {
2059
- tcx. ensure ( ) . promoted_mir ( def_id) ;
2059
+ tcx. ensure_with_value ( ) . promoted_mir ( def_id) ;
2060
2060
}
2061
2061
} )
2062
2062
}
Original file line number Diff line number Diff line change @@ -444,7 +444,7 @@ fn mir_drops_elaborated_and_const_checked(
444
444
445
445
// Do not compute the mir call graph without said call graph actually being used.
446
446
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) ) ;
448
448
}
449
449
}
450
450
You can’t perform that action at this time.
0 commit comments