2016-08-26 11:23:42 -05:00
|
|
|
#![allow(unused)]
|
|
|
|
#![deny(improper_ctypes)]
|
2016-08-24 13:10:19 -05:00
|
|
|
|
2016-08-26 11:23:42 -05:00
|
|
|
#[repr(C)]
|
2016-08-24 13:10:19 -05:00
|
|
|
union U {
|
|
|
|
a: u8,
|
|
|
|
}
|
|
|
|
|
2016-08-26 11:23:42 -05:00
|
|
|
union W {
|
|
|
|
a: u8,
|
2016-08-24 13:10:19 -05:00
|
|
|
}
|
|
|
|
|
2016-08-26 11:23:42 -05:00
|
|
|
extern "C" {
|
|
|
|
static FOREIGN1: U; // OK
|
2019-09-10 16:29:31 -05:00
|
|
|
static FOREIGN2: W; //~ ERROR `extern` block uses type `W`
|
2016-08-24 13:10:19 -05:00
|
|
|
}
|
2016-08-26 11:23:42 -05:00
|
|
|
|
|
|
|
fn main() {}
|