Use ensure for analysis calls

This commit is contained in:
bjorn3 2024-12-08 16:57:09 +00:00
parent 23fda35811
commit 0df80949aa
2 changed files with 2 additions and 2 deletions

View File

@ -449,7 +449,7 @@ fn run_compiler(
return early_exit();
}
let _ = tcx.analysis(());
tcx.ensure().analysis(());
if callbacks.after_analysis(compiler, tcx) == Compilation::Stop {
return early_exit();

View File

@ -223,7 +223,7 @@ impl<'tcx> PrintExtra<'tcx> {
pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
if ppm.needs_analysis() {
let _ = ex.tcx().analysis(());
ex.tcx().ensure().analysis(());
}
let (src, src_name) = get_source(sess);