Skip to content

Commit 0df8094

Browse files
committed
Use ensure for analysis calls
1 parent 23fda35 commit 0df8094

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: compiler/rustc_driver_impl/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ fn run_compiler(
449449
return early_exit();
450450
}
451451

452-
let _ = tcx.analysis(());
452+
tcx.ensure().analysis(());
453453

454454
if callbacks.after_analysis(compiler, tcx) == Compilation::Stop {
455455
return early_exit();

Diff for: compiler/rustc_driver_impl/src/pretty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl<'tcx> PrintExtra<'tcx> {
223223

224224
pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
225225
if ppm.needs_analysis() {
226-
let _ = ex.tcx().analysis(());
226+
ex.tcx().ensure().analysis(());
227227
}
228228

229229
let (src, src_name) = get_source(sess);

0 commit comments

Comments
 (0)