diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-05-02 17:57:30 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-05-02 18:12:48 +0200 |
| commit | b71cd56e48efce342357617f5206b1cc77ea8902 (patch) | |
| tree | 1a85a54dbc50a30008acbcbdda5759a20499db3d | |
| parent | b25292473a339869dc818768d45ec06ab59e8767 (diff) | |
| download | rust-b71cd56e48efce342357617f5206b1cc77ea8902.tar.gz rust-b71cd56e48efce342357617f5206b1cc77ea8902.zip | |
Move queries.crate_name()
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 2b8c69a1307..bdb75fc6928 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -388,10 +388,10 @@ fn run_compiler( return early_exit(); } - let crate_name = queries.crate_name()?.peek().clone(); queries.global_ctxt()?.peek_mut().enter(|tcx| { - let result = tcx.analysis(LOCAL_CRATE); + tcx.analysis(LOCAL_CRATE)?; if sess.opts.debugging_opts.save_analysis { + let crate_name = queries.crate_name()?.peek().clone(); sess.time("save_analysis", || { save::process_crate( tcx, @@ -405,7 +405,7 @@ fn run_compiler( ) }); } - result + Ok(()) })?; if callbacks.after_analysis(compiler, queries) == Compilation::Stop { |
