Bad parse error on token sequences safe unsafe
and unsafe safe
(before extern fns)
#133630
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-edition-2024
Area: The 2024 edition
A-parser
Area: The parsing of Rust source code to an AST
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
help: unsafe comes before safe: `unsafe safe`
Desired output
error: safe is invalid outside of `unsafe extern` blocks help: extern functions are safe by default
Rationale and extra context
this is a follow-up to my previous issue #133586, for more info you can visit it or see the PR (#133618 (closed))
Other cases
Rust Version
Anything else?
The same happens with nightly releases
The text was updated successfully, but these errors were encountered: