Bad parse error on token sequences safe unsafe
and unsafe safe
(before extern blocks)
#133586
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-edition-2024
Area: The 2024 edition
A-parser
Area: The lexing & parsing of Rust source code to an AST
C-bug
Category: This is a bug.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Code
Current output
Desired output
Rationale and extra context
the same happens with nightly releases
Other cases
These cases are better mentioned in my newest issue (follow up: #133630)
Note: this is an edit which was made after the pull request
Ouput:
Note: when unsafe and safe are reversed here, it just tells you to reverse it again, but at least this time you aren't in a loop
Rust Version
Anything else?
i was just messing around when i found out
safe
was a valid keyword, but then i got an infinite loop of reversing the order of safe and unsafeThe text was updated successfully, but these errors were encountered: