diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-06 21:56:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-06 21:56:28 +0100 |
| commit | 79e5424e313cb6fc725f738a4ac1d3220932d3cd (patch) | |
| tree | c3340df191c21a43c9d8dccec48dfda6ba6ac9ed /compiler/rustc_errors/src | |
| parent | 3eb1ef836eaece6dd52ce0b27f9983b8c6b20ee1 (diff) | |
| parent | b9b2c3affcc51e85d793f51875db067513642863 (diff) | |
| download | rust-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.rs | 4 |
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(); } } |
