Closed as not planned
Closed as not planned
Description
Code
safe unsafe extern "C" fn foo() {
// ...
}
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
unsafe safe extern "C" fn foo() {} // safe is recognised as an identifier, and suggests putting a block around it
Rust Version
rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: x86_64-unknown-linux-gnu
release: 1.82.0
LLVM version: 19.1.1
Anything else?
The same happens with nightly releases