We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://play.rust-lang.org/?gist=d8a933822fb81608431b4001e6bae154&version=stable&mode=debug&edition=2015
Given this
#![crate_type = "rlib"] extern "C" { pub static mut foo: fn()->(); // WARNS //pub static mut bar: fn "extern"()->(); // ERRORS pub static mut baz: extern fn()->(); // OK }
the warning on foo is:
foo
| 4 | pub static mut foo: fn()->(); // WARNS | ^^^^^^^^ | = note: #[warn(improper_ctypes)] on by default = help: consider using an `fn "extern"(...) -> ...` function pointer instead
The code suggested does not work though, it should be extern fn(...) -> ... instead.
extern fn(...) -> ...
The text was updated successfully, but these errors were encountered:
Fix typo in improper_ctypes suggestion
e20f1d1
closes rust-lang#52345
Rollup merge of rust-lang#52346 - rkruppe:patch-1, r=cramertj
fe1b410
Fix typo in improper_ctypes suggestion closes rust-lang#52345
Successfully merging a pull request may close this issue.
https://play.rust-lang.org/?gist=d8a933822fb81608431b4001e6bae154&version=stable&mode=debug&edition=2015
Given this
the warning on
foo
is:The code suggested does not work though, it should be
extern fn(...) -> ...
instead.The text was updated successfully, but these errors were encountered: