about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/queries.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-19 10:13:51 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-22 08:03:47 +1100
commitc2512a130f398d923229c3dc401be10c357a3b8d (patch)
tree10a920c73d8426a9bd11bfdadc4aa15a5bb4d3af /compiler/rustc_interface/src/queries.rs
parent72b172bdf631483d0f802c54c8dc8246f6b4e00e (diff)
downloadrust-c2512a130f398d923229c3dc401be10c357a3b8d.tar.gz
rust-c2512a130f398d923229c3dc401be10c357a3b8d.zip
Inline and remove `Session::compile_status`.
Because it's now simple enough that it doesn't provide much benefit.
Diffstat (limited to 'compiler/rustc_interface/src/queries.rs')
-rw-r--r--compiler/rustc_interface/src/queries.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs
index 8170c0a5a1a..86858bfe41d 100644
--- a/compiler/rustc_interface/src/queries.rs
+++ b/compiler/rustc_interface/src/queries.rs
@@ -261,7 +261,9 @@ impl Linker {
         let (codegen_results, work_products) =
             codegen_backend.join_codegen(self.ongoing_codegen, sess, &self.output_filenames);
 
-        sess.compile_status()?;
+        if let Some(guar) = sess.dcx().has_errors() {
+            return Err(guar);
+        }
 
         sess.time("serialize_work_products", || {
             rustc_incremental::save_work_product_index(sess, &self.dep_graph, work_products)