- // FIXME(Centril): Reintegrate this with `fn new_in` when we can.
-
- // `!0` is `usize::MAX`. This branch should be stripped at compile time.
- // FIXME(mark-i-m): use this line when `if`s are allowed in `const`:
- //let cap = if mem::size_of::<T>() == 0 { !0 } else { 0 };
-
- // `Unique::empty()` doubles as "unallocated" and "zero-sized allocation".
- RawVec {
- ptr: Unique::empty(),
- // FIXME(mark-i-m): use `cap` when ifs are allowed in const
- cap: [0, !0][(mem::size_of::<T>() == 0) as usize],
- a: Global,
- }