-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Wrong suggestion: remove the qualifiers: fn
#78941
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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. |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Nov 19, 2020
…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.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Nov 19, 2020
…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.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Nov 19, 2020
…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 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
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: