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