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