1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#![allow(unused)] #![deny(improper_ctypes)] #[repr(C)] union U { a: u8, } union W { a: u8, } extern "C" { static FOREIGN1: U; // OK static FOREIGN2: W; //~ ERROR `extern` block uses type `W` } fn main() {}