rust/tests/ui/union/union-repr-c.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
226 B
Rust
Raw Normal View History

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