2 #![deny(improper_ctypes)]
6 // This test checks that non-exhaustive types with `#[repr(C)]` from an extern crate are considered
9 use types
::{NonExhaustiveEnum, NonExhaustiveVariants, NormalStruct, TupleStruct, UnitStruct}
;
12 pub fn non_exhaustive_enum(_
: NonExhaustiveEnum
);
13 //~^ ERROR `extern` block uses type `NonExhaustiveEnum`, which is not FFI-safe
14 pub fn non_exhaustive_normal_struct(_
: NormalStruct
);
15 //~^ ERROR `extern` block uses type `NormalStruct`, which is not FFI-safe
16 pub fn non_exhaustive_unit_struct(_
: UnitStruct
);
17 //~^ ERROR `extern` block uses type `UnitStruct`, which is not FFI-safe
18 pub fn non_exhaustive_tuple_struct(_
: TupleStruct
);
19 //~^ ERROR `extern` block uses type `TupleStruct`, which is not FFI-safe
20 pub fn non_exhaustive_variant(_
: NonExhaustiveVariants
);
21 //~^ ERROR `extern` block uses type `NonExhaustiveVariants`, which is not FFI-safe