rust/tests/ui/union/union-const-eval.rs

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

14 lines
164 B
Rust
Raw Normal View History

2021-06-03 07:31:27 +00:00
//@ check-pass
union U {
a: usize,
b: usize,
}
const C: U = U { a: 10 };
fn main() {
2018-01-16 08:24:38 +00:00
let a: [u8; unsafe { C.a }];
let b: [u8; unsafe { C.b }];
}