Use ensure_with_value in a few more places.
This commit is contained in:
parent
382cc909d5
commit
e955ec0908
@ -435,8 +435,9 @@ fn compute_hir_hash(
|
|||||||
|
|
||||||
pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> hir::Crate<'_> {
|
pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> hir::Crate<'_> {
|
||||||
let sess = tcx.sess;
|
let sess = tcx.sess;
|
||||||
tcx.ensure().output_filenames(());
|
// Queries that borrow `resolver_for_lowering`.
|
||||||
let _ = tcx.early_lint_checks(()); // Borrows `resolver_for_lowering`.
|
tcx.ensure_with_value().output_filenames(());
|
||||||
|
tcx.ensure_with_value().early_lint_checks(());
|
||||||
let (mut resolver, krate) = tcx.resolver_for_lowering(()).steal();
|
let (mut resolver, krate) = tcx.resolver_for_lowering(()).steal();
|
||||||
|
|
||||||
let ast_index = index_crate(&resolver.node_id_to_def_id, &krate);
|
let ast_index = index_crate(&resolver.node_id_to_def_id, &krate);
|
||||||
|
@ -2050,13 +2050,13 @@ fn prefetch_mir(tcx: TyCtxt<'_>) {
|
|||||||
let (encode_const, encode_opt) = should_encode_mir(tcx, def_id);
|
let (encode_const, encode_opt) = should_encode_mir(tcx, def_id);
|
||||||
|
|
||||||
if encode_const {
|
if encode_const {
|
||||||
tcx.ensure().mir_for_ctfe(def_id);
|
tcx.ensure_with_value().mir_for_ctfe(def_id);
|
||||||
}
|
}
|
||||||
if encode_opt {
|
if encode_opt {
|
||||||
tcx.ensure().optimized_mir(def_id);
|
tcx.ensure_with_value().optimized_mir(def_id);
|
||||||
}
|
}
|
||||||
if encode_opt || encode_const {
|
if encode_opt || encode_const {
|
||||||
tcx.ensure().promoted_mir(def_id);
|
tcx.ensure_with_value().promoted_mir(def_id);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,7 @@ fn mir_drops_elaborated_and_const_checked(
|
|||||||
|
|
||||||
// Do not compute the mir call graph without said call graph actually being used.
|
// Do not compute the mir call graph without said call graph actually being used.
|
||||||
if inline::Inline.is_enabled(&tcx.sess) {
|
if inline::Inline.is_enabled(&tcx.sess) {
|
||||||
let _ = tcx.mir_inliner_callees(ty::InstanceDef::Item(def));
|
tcx.ensure_with_value().mir_inliner_callees(ty::InstanceDef::Item(def));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user