]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lint/lint-ctypes-66202.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / lint / lint-ctypes-66202.rs
CommitLineData
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)]
9pub struct W<T>(T);
10
11extern "C" {
12 pub fn bare() -> ();
13 pub fn normalize() -> <() as ToOwned>::Owned;
14 pub fn transparent() -> W<()>;
15}
16
17fn main() {}