2021-06-03 03:31:27 -04:00
|
|
|
// check-pass
|
2021-05-13 10:42:25 -04:00
|
|
|
// revisions: mirunsafeck thirunsafeck
|
|
|
|
// [thirunsafeck]compile-flags: -Z thir-unsafeck
|
|
|
|
|
2016-08-22 19:56:14 +03:00
|
|
|
union U {
|
|
|
|
a: usize,
|
|
|
|
b: usize,
|
|
|
|
}
|
|
|
|
|
|
|
|
const C: U = U { a: 10 };
|
|
|
|
|
|
|
|
fn main() {
|
2018-01-16 09:24:38 +01:00
|
|
|
let a: [u8; unsafe { C.a }];
|
|
|
|
let b: [u8; unsafe { C.b }];
|
2016-08-22 19:56:14 +03:00
|
|
|
}
|