-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
extern {
unsafe fn f();
}
Current output
error: functions in `extern` blocks cannot have qualifiers
--> src\main.rs:2:15
|
1 | extern {
| ------ in this `extern` block
2 | unsafe fn f();
| ^
|
help: remove the qualifiers
|
2 | fn f();
| ~~
Desired output
error: functions in `extern` blocks cannot have qualifiers
--> src\main.rs:2:15
|
1 | extern {
| ------ in this `extern` block
2 | unsafe fn f();
| ^
|
help: remove the qualifiers
|
2 | unsafe fn f();
| ~~~~~~
Rationale and extra context
Fn is not a qualifier.
Other cases
No response
Rust Version
rustc 1.77.1 (7cf61ebde 2024-03-27)
binary: rustc
commit-hash: 7cf61ebde7b22796c69757901dd346d0fe70bd97
commit-date: 2024-03-27
host: x86_64-pc-windows-msvc
release: 1.77.1
LLVM version: 17.0.6
Anything else?
No response
linyihai
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.