We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
This is from a configuration of rustfmt force_explicit_abi.
force_explicit_abi
When using extern to specify an external function, it's advised to explicitly specify C-ABI.
extern
C-ABI
Although the default is C-ABI if extern is not specified, it is a convention for Rust to specify it explicitly.
No response
bad case:
// Noncompliant extern { pub static lorem: c_int; }
good case:
// Compliant extern "C" { pub static lorem: c_int; } extern "Rust" { type MyType; fn f(&self) -> usize; }
The text was updated successfully, but these errors were encountered:
@rustbot claim
Sorry, something went wrong.
extern_without_abi
already have a rustc lint, rust-lang/rust#76219
CBSpeir
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
What it does
This is from a configuration of rustfmt
force_explicit_abi
.When using
extern
to specify an external function, it's advised to explicitly specifyC-ABI
.Although the default is
C-ABI
ifextern
is not specified, it is a convention for Rust to specify it explicitly.Advantage
extern
to specify an external function;Drawbacks
No response
Example
bad case:
good case:
The text was updated successfully, but these errors were encountered: