about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-06 21:56:28 +0100
committerGitHub <noreply@github.com>2025-02-06 21:56:28 +0100
commit79e5424e313cb6fc725f738a4ac1d3220932d3cd (patch)
treec3340df191c21a43c9d8dccec48dfda6ba6ac9ed /compiler/rustc_errors/src
parent3eb1ef836eaece6dd52ce0b27f9983b8c6b20ee1 (diff)
parentb9b2c3affcc51e85d793f51875db067513642863 (diff)
downloadrust-79e5424e313cb6fc725f738a4ac1d3220932d3cd.tar.gz
rust-79e5424e313cb6fc725f738a4ac1d3220932d3cd.zip
Rollup merge of #136636 - bjorn3:error_cleanup, r=compiler-errors
Couple of minor cleanups to the diagnostic infrastructure
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index 7a02e0dd2f0..9af17db9a6e 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -1048,8 +1048,8 @@ impl<'a> DiagCtxtHandle<'a> {
     /// bad results, such as spurious/uninteresting additional errors -- when
     /// returning an error `Result` is difficult.
     pub fn abort_if_errors(&self) {
-        if self.has_errors().is_some() {
-            FatalError.raise();
+        if let Some(guar) = self.has_errors() {
+            guar.raise_fatal();
         }
     }