about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-24 21:34:54 +0100
committerGitHub <noreply@github.com>2022-11-24 21:34:54 +0100
commit4843946a10979e25ce4b26def0d19845e15d5f95 (patch)
treee6ea1ec7b8a74228dacf8fae37a87351202d6ae2 /compiler/rustc_session/src
parentd4e5418b0c787cad2994548c3327b0de38a55506 (diff)
parent72d8879c29570ee18cc3ab2c3e96bfd97221d0bb (diff)
downloadrust-4843946a10979e25ce4b26def0d19845e15d5f95.tar.gz
rust-4843946a10979e25ce4b26def0d19845e15d5f95.zip
Rollup merge of #104780 - BoxyUwU:error_reported_not_be_bad, r=oli-obk
make `error_reported` check for delayed bugs

Fixes #104768

`error_reported()` was only checking if there were errors emitted, not for `delay_bug`s which can also be a source of `ErrorGuaranteed`. I assume the same is true of `lint_err_count` but i dont know
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/session.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index fb0b62e025e..e99e460913e 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -538,9 +538,12 @@ impl Session {
     pub fn has_errors(&self) -> Option<ErrorGuaranteed> {
         self.diagnostic().has_errors()
     }
-    pub fn has_errors_or_delayed_span_bugs(&self) -> bool {
+    pub fn has_errors_or_delayed_span_bugs(&self) -> Option<ErrorGuaranteed> {
         self.diagnostic().has_errors_or_delayed_span_bugs()
     }
+    pub fn is_compilation_going_to_fail(&self) -> Option<ErrorGuaranteed> {
+        self.diagnostic().is_compilation_going_to_fail()
+    }
     pub fn abort_if_errors(&self) {
         self.diagnostic().abort_if_errors();
     }