2020-07-05 12:53:00 +02:00
|
|
|
#![allow(invalid_value)]
|
|
|
|
|
|
|
|
union MyUninit {
|
|
|
|
init: (),
|
2022-08-27 15:59:27 -04:00
|
|
|
uninit: [bool; 1],
|
2020-07-05 12:53:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2022-08-27 15:59:27 -04:00
|
|
|
let _b = unsafe { MyUninit { init: () }.uninit }; //~ ERROR: constructing invalid value
|
2020-07-05 12:53:00 +02:00
|
|
|
}
|