alloc-wg 0.9.0

Attempt of collection several proposals of the allocators-wg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// use alloc_wg::boxed::Box;
// use core::{mem::MaybeUninit, ptr::NonNull};
//
// #[test]
// fn unitialized_zero_size_box() {
//     assert_eq!(
//         &*Box::<()>::new_uninit() as *const _,
//         NonNull::<MaybeUninit<()>>::dangling().as_ptr(),
//     );
//     assert_eq!(
//         Box::<[()]>::new_uninit_slice(4).as_ptr(),
//         NonNull::<MaybeUninit<()>>::dangling().as_ptr(),
//     );
//     assert_eq!(
//         Box::<[String]>::new_uninit_slice(0).as_ptr(),
//         NonNull::<MaybeUninit<String>>::dangling().as_ptr(),
//     );
// }