-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Confusing diagnostic for inversion of extern "..."
and unsafe
in function decl
#87217
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
poliorcetics
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jul 17, 2021
Addition: this works with visibilities coming after
|
@rustbot claim |
tgross35
added a commit
to tgross35/rust
that referenced
this issue
Jul 26, 2024
…compiler-errors Improve `extern "<abi>" unsafe fn()` error message These errors were already reported in rust-lang#87217, and fixed by rust-lang#87235 but missed the case of an explicit ABI. This PR does not cover multiple keywords like `extern "C" pub const unsafe fn()`, but I don't know what a good way to cover this would be. It also seems rarer than `extern "C" unsafe` which I saw happen a few times in workshops.
tgross35
added a commit
to tgross35/rust
that referenced
this issue
Jul 26, 2024
…compiler-errors Improve `extern "<abi>" unsafe fn()` error message These errors were already reported in rust-lang#87217, and fixed by rust-lang#87235 but missed the case of an explicit ABI. This PR does not cover multiple keywords like `extern "C" pub const unsafe fn()`, but I don't know what a good way to cover this would be. It also seems rarer than `extern "C" unsafe` which I saw happen a few times in workshops.
tgross35
added a commit
to tgross35/rust
that referenced
this issue
Jul 26, 2024
…compiler-errors Improve `extern "<abi>" unsafe fn()` error message These errors were already reported in rust-lang#87217, and fixed by rust-lang#87235 but missed the case of an explicit ABI. This PR does not cover multiple keywords like `extern "C" pub const unsafe fn()`, but I don't know what a good way to cover this would be. It also seems rarer than `extern "C" unsafe` which I saw happen a few times in workshops.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 27, 2024
Rollup merge of rust-lang#128229 - tdittr:unsafe-extern-abi-error, r=compiler-errors Improve `extern "<abi>" unsafe fn()` error message These errors were already reported in rust-lang#87217, and fixed by rust-lang#87235 but missed the case of an explicit ABI. This PR does not cover multiple keywords like `extern "C" pub const unsafe fn()`, but I don't know what a good way to cover this would be. It also seems rarer than `extern "C" unsafe` which I saw happen a few times in workshops.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code (playground link):
The current output is:
Ideally the output should look like the one for inverting
unsafe
and a visibility likepub
:Meta
rustc -V
:The text was updated successfully, but these errors were encountered: