-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Labels
Description
I tried this code: https://github.com/rust-lang/rust/blob/aa3ca1994904f2e056679fce1f185db8c7ed2703/src/test/ui/issue-14309.rs
https://godbolt.org/z/GjGG3jTh4
struct A {
x: i32
}
#[repr(C, packed)]
struct B {
x: i32,
y: A
}
#[repr(C)]
struct C {
x: i32
}
type A2 = A;
type B2 = B;
type C2 = C;
#[repr(C)]
struct D {
x: C,
y: A
}
extern "C" {
fn foo(x: A); //~ ERROR type `A` which is not FFI-safe
fn bar(x: B); //~ ERROR type `A`
fn baz(x: C);
fn qux(x: A2); //~ ERROR type `A`
fn quux(x: B2); //~ ERROR type `A`
fn corge(x: C2);
fn fred(x: D); //~ ERROR type `A`
}
fn main() { }
I expected to see this happen: errors that type 'A' is not FFI-safe
Instead, this happened: compile-without error
Meta
- What version of Rust GCC were you using, git sha if possible. be27571
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo