]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-repr-c.rs
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31
[rust.git] / src / test / ui / union / union-repr-c.rs
1 #![allow(unused)]
2 #![deny(improper_ctypes)]
3
4 #[repr(C)]
5 union U {
6     a: u8,
7 }
8
9 union W {
10     a: u8,
11 }
12
13 extern "C" {
14     static FOREIGN1: U; // OK
15     static FOREIGN2: W; //~ ERROR `extern` block uses type `W`
16 }
17
18 fn main() {}