Reduce the amount of explicit FatalError.raise()
Instead use dcx.abort_if_error() or guar.raise_fatal() instead. These guarantee that an error actually happened previously and thus we don't silently abort.
This commit is contained in:
parent
8a1f8039a7
commit
701e2f708b
6 changed files with 22 additions and 41 deletions
|
@ -597,8 +597,7 @@ impl<'a> Parser<'a> {
|
|||
// When encountering severely malformed code where there are several levels of
|
||||
// nested unclosed angle args (`f::<f::<f::<f::<...`), we avoid severe O(n^2)
|
||||
// behavior by bailing out earlier (#117080).
|
||||
e.emit();
|
||||
rustc_errors::FatalError.raise();
|
||||
e.emit().raise_fatal();
|
||||
}
|
||||
Err(e) if is_first_invocation && self.unmatched_angle_bracket_count > 0 => {
|
||||
self.angle_bracket_nesting -= 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue