Closed
Description
The following code:
pub struct Bar;
#[repr(C)]
pub struct Foo {
bar: Bar
}
extern {
pub fn extern_func(foo: Foo);
}
fn main() {
}
(Playpen: http://is.gd/ANqwz9)
Gives the error:
<anon>:8:29: 8:32 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>:8 pub fn extern_func(foo: Foo);
^~~
Despite Foo being marked as #[repr(C)]. This should either:
- Include a note specifying which part of Foo is causing it to not be repr(C), or
- Cause an error, since Foo is not repr(C), despite being marked as such.
Metadata
Metadata
Assignees
Labels
No labels