-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong suggestion: remove the qualifiers: fn
#78941
Comments
It would be clearer if this wasn't an inline suggestion. The suggestion is trying to communicate to write
This can be easily be fixed with a change from |
@rustbot claim |
When using
Is this what is desired? |
Yes. |
…stebank Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block. This mitigates rust-lang#78941. As suggested by `@estebank,` `span_suggestion` was replaced with `span_suggestion_verbose` for this specific diagnostic.
…stebank Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block. This mitigates rust-lang#78941. As suggested by ``@estebank,`` `span_suggestion` was replaced with `span_suggestion_verbose` for this specific diagnostic.
…stebank Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block. This mitigates rust-lang#78941. As suggested by ```@estebank,``` `span_suggestion` was replaced with `span_suggestion_verbose` for this specific diagnostic.
Closing as fixed. @ThePuzzlemaker You could close an issue by writing |
When declaring extern functions with any qualifier (async, const, unsafe) like down below, rustc incorrectly suggests to remove the qualifier
fn
The error message
The text was updated successfully, but these errors were encountered: