mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
16 lines
251 B
Rust
16 lines
251 B
Rust
// check-pass
|
|
// revisions: mirunsafeck thirunsafeck
|
|
// [thirunsafeck]compile-flags: -Z thir-unsafeck
|
|
|
|
union U {
|
|
a: usize,
|
|
b: usize,
|
|
}
|
|
|
|
const C: U = U { a: 10 };
|
|
|
|
fn main() {
|
|
let a: [u8; unsafe { C.a }];
|
|
let b: [u8; unsafe { C.b }];
|
|
}
|