Closed
Description
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:
|
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.
Metadata
Metadata
Assignees
Labels
No labels