Skip to content

Commit

Permalink
Use ensure for analysis calls
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Dec 8, 2024
1 parent 23fda35 commit 0df8094
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_driver_impl/src/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0df8094

Please sign in to comment.