Replace unnecessary abort_if_errors
.
Replace `abort_if_errors` calls that are certain to abort -- because we emit an error immediately beforehand -- with `FatalErro.raise()`.
This commit is contained in:
parent
44006444c8
commit
4da67fff61
6 changed files with 13 additions and 23 deletions
|
@ -876,6 +876,10 @@ impl DiagCtxt {
|
|||
}
|
||||
}
|
||||
|
||||
/// This excludes delayed bugs and stashed errors. Used for early aborts
|
||||
/// after errors occurred -- e.g. because continuing in the face of errors is
|
||||
/// likely to lead to 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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue