Rollup merge of #136636 - bjorn3:error_cleanup, r=compiler-errors
Couple of minor cleanups to the diagnostic infrastructure
This commit is contained in:
commit
79e5424e31
6 changed files with 12 additions and 22 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue