diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-05-03 13:44:13 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-05-03 13:44:13 +0200 |
| commit | 163b4801e72a11803a6dcfece2099b11e5a9be76 (patch) | |
| tree | 58c7d4bde4159b458b3e5d90f555fc1c5befe562 | |
| parent | b71cd56e48efce342357617f5206b1cc77ea8902 (diff) | |
Run save_analysis even when analysis returned an error
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index bdb75fc6928..bd96d225855 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -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", || { @@ -405,7 +405,7 @@ fn run_compiler( ) }); } - Ok(()) + result })?; if callbacks.after_analysis(compiler, queries) == Compilation::Stop { |
