Avoid manually producing FatalError in a couple of places

This commit is contained in:
bjorn3 2025-02-05 15:09:15 +00:00
parent 9a833de62a
commit 8a0adec05b
2 changed files with 3 additions and 3 deletions

View file

@ -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();
}
}