Closed
Description
#![allow(dead_code)]
struct Foo;
#[repr(C)]
struct Bar { x: Foo }
extern { fn whatever(x: Bar); }
fn main() {}
<anon>:7:25: 7:28 warning: found type without foreign-function-safe
representation annotation in foreign module, consider adding a #[repr(...)] attribute to the type, #[warn(ctypes)] on by default
<anon>:7 extern { fn whatever(x: Bar); }
^~~
This could either be a warning on Bar
, that Foo
isn't FFI safe; or not a warning at all. (Or, at the very least, a note pointing to the x
field, to help diagnose the problem.)