Skip to content

Commit 163b480

Browse files
committed
Run save_analysis even when analysis returned an error
1 parent b71cd56 commit 163b480

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_driver/src

1 file changed

+2
-2
lines changed

compiler/rustc_driver/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ fn run_compiler(
389389
}
390390

391391
queries.global_ctxt()?.peek_mut().enter(|tcx| {
392-
tcx.analysis(LOCAL_CRATE)?;
392+
let result = tcx.analysis(LOCAL_CRATE);
393393
if sess.opts.debugging_opts.save_analysis {
394394
let crate_name = queries.crate_name()?.peek().clone();
395395
sess.time("save_analysis", || {
@@ -405,7 +405,7 @@ fn run_compiler(
405405
)
406406
});
407407
}
408-
Ok(())
408+
result
409409
})?;
410410

411411
if callbacks.after_analysis(compiler, queries) == Compilation::Stop {

0 commit comments

Comments
 (0)