diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-05 15:09:15 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-06 17:29:15 +0000 |
| commit | 8a0adec05bf99d229e33545ba16c65c210e40142 (patch) | |
| tree | 2ed1aef18eefac28a2f785d605e580c56d507ba3 /compiler/rustc_errors/src/lib.rs | |
| parent | 9a833de62a1de598ea54ad0b8ac01369f8d23c85 (diff) | |
| download | rust-8a0adec05bf99d229e33545ba16c65c210e40142.tar.gz rust-8a0adec05bf99d229e33545ba16c65c210e40142.zip | |
Avoid manually producing FatalError in a couple of places
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -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(); } } |
