Closed
Description
#[repr(C)]
pub struct Foo(::std::marker::PhantomData<i32>);
extern {
pub fn f(foo: *mut Foo);
}
fn main() {}
warning: found non-foreign-function-safe member in struct marked #[repr(C)]: found struct without foreign-function-safe representation annotation in foreign module, consider adding a #[repr(C)] attribute to the type, #[warn(improper_ctypes)] on by default
--> <anon>:5:19
5 |> pub fn f(foo: *mut Foo);
|> ^^^^^^^^
This comes up in bindings generated from C code that contains unions (the __BindgenUnionField
type).
Metadata
Metadata
Assignees
Labels
No labels