Closed
Description
When declaring extern functions with any qualifier (async, const, unsafe) like down below, rustc incorrectly suggests to remove the qualifier fn
extern "C" {
async fn calleth();
}
The error message
error: functions in `extern` blocks cannot have qualifiers
--> src/lib.rs:2:14
|
1 | extern "C" {
| ---------- in this `extern` block
2 | async fn calleth();
| ---------^^^^^^^
| |
| help: remove the qualifiers: `fn`
error: aborting due to previous error
error: could not compile `playground`
To learn more, run the command again with --verbose.
Metadata
Metadata
Assignees
Labels
Area: Suggestions generated by the compiler applied by `cargo fix`Category: This is a bug.Diagnostics: A structured suggestion resulting in incorrect code.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Relevant to the compiler team, which will review and decide on the PR/issue.