MaybeUninit replaces mem::uninitialized

Changes in new versions / Rust 1.36

// *** before: ***
// the value was declared to exist while it did not:
// for types like bool or a reference that is undefined behaviour
let x: i32 = unsafe { std::mem::uninitialized() };

// *** in version 1.36: ***
use std::mem::MaybeUninit;

let mut slot = MaybeUninit::<i32>::uninit();
slot.write(7);                            // written first
let x = unsafe { slot.assume_init() };    // and only then declared ready
println!("{}", x);