-
Notifications
You must be signed in to change notification settings - Fork 13.4k
hang in parser::diagnostics::expected_one_of_not_found() #124897
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The lexing & parsing of Rust source code to an AST
C-bug
Category: This is a bug.
regression-untriaged
Untriaged performance or correctness regression.
Comments
Sharing the stack would be useful |
🤔 that doesn't really seem to be it
|
You need to switch to like thread 2 or 3 if you're doing this in gdb |
it's not particularly deep, but it looks downstream of
|
Minimal:
|
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 11, 2024
Rollup merge of rust-lang#124930 - compiler-errors:consume-arg, r=petrochenkov Make sure we consume a generic arg when checking mistyped turbofish When recovering un-turbofish-ed args in expr position (e.g. `let x = a<T, U>();` in `check_mistyped_turbofish_with_multiple_type_params`, we used `parse_seq_to_before_end` to parse the fake generic args; however, it used `parse_generic_arg` which *optionally* parses a generic arg. If it doesn't end up parsing an arg, it returns `Ok(None)` and consumes no tokens. If we don't find a delimiter after this (`,`), we try parsing *another* element. In this case, we just infinitely loop looking for a subsequent element. We can fix this by making sure that we either parse a generic arg or error in `parse_seq_to_before_end`'s callback. Fixes rust-lang#124897
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The lexing & parsing of Rust source code to an AST
C-bug
Category: This is a bug.
regression-untriaged
Untriaged performance or correctness regression.
Code
I tried this code:
on stable 1.78.0, this checks in 0.02 seconds.
on beta 1.79.0-beta.3, this hangs somewhere in
parser::diagnostics::expected_one_of_not_found()
, I killed it after 5 minutes of no progress.The text was updated successfully, but these errors were encountered: