about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
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_codegen_ssa/src/back
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_codegen_ssa/src/back')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 435b517e602..7e3f324fe14 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -487,7 +487,9 @@ fn collate_raw_dylibs<'a, 'b>(
             }
         }
     }
-    sess.compile_status()?;
+    if let Some(guar) = sess.dcx().has_errors() {
+        return Err(guar);
+    }
     Ok(dylib_table
         .into_iter()
         .map(|(name, imports)| {