Skip to content

Commit

Permalink
Run save_analysis even when analysis returned an error
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed May 3, 2021
1 parent b71cd56 commit 163b480
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ fn run_compiler(
}

queries.global_ctxt()?.peek_mut().enter(|tcx| {
tcx.analysis(LOCAL_CRATE)?;
let result = tcx.analysis(LOCAL_CRATE);
if sess.opts.debugging_opts.save_analysis {
let crate_name = queries.crate_name()?.peek().clone();
sess.time("save_analysis", || {
Expand All @@ -405,7 +405,7 @@ fn run_compiler(
)
});
}
Ok(())
result
})?;

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

0 comments on commit 163b480

Please sign in to comment.