about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/path.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-20 14:08:24 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-20 14:09:25 +0000
commit701e2f708b95d508f90ffd5a3b234335662ae521 (patch)
treeeb11e840c219dc7f474ca9757287b01e4887c8ee /compiler/rustc_parse/src/parser/path.rs
parent8a1f8039a7ded79d3d4fe97b110016d89f2b11e2 (diff)
downloadrust-701e2f708b95d508f90ffd5a3b234335662ae521.tar.gz
rust-701e2f708b95d508f90ffd5a3b234335662ae521.zip
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.
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
-rw-r--r--compiler/rustc_parse/src/parser/path.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs
index 73612d1da29..39737b9e137 100644
--- a/compiler/rustc_parse/src/parser/path.rs
+++ b/compiler/rustc_parse/src/parser/path.rs
@@ -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;