]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | // check-pass |
2 | ||
3 | #![deny(improper_ctypes)] | |
4 | ||
5 | // This test checks that return types are normalized before being checked for FFI-safety, and that | |
6 | // transparent newtype wrappers are FFI-safe if the type being wrapped is FFI-safe. | |
7 | ||
8 | #[repr(transparent)] | |
9 | pub struct W<T>(T); | |
10 | ||
11 | extern "C" { | |
12 | pub fn bare() -> (); | |
13 | pub fn normalize() -> <() as ToOwned>::Owned; | |
14 | pub fn transparent() -> W<()>; | |
15 | } | |
16 | ||
17 | fn main() {} |