diff options
| author | Mark Mansi <markm@cs.wisc.edu> | 2019-12-18 12:04:47 -0600 |
|---|---|---|
| committer | Mark Mansi <markm@cs.wisc.edu> | 2019-12-18 20:19:05 -0600 |
| commit | 7d268119f07aeb41a1abe093c3fd2434743ac228 (patch) | |
| tree | 63c59dc24b53aec817dd64cccf7a81db27241bb1 /src/liballoc/raw_vec.rs | |
| parent | 253543560aa10f90607b23b5b12be3cfe28fdb1b (diff) | |
no need to bootstrap
Diffstat (limited to 'src/liballoc/raw_vec.rs')
| -rw-r--r-- | src/liballoc/raw_vec.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index 96de5185b88..3201c702abb 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -52,14 +52,7 @@ impl<T, A: Alloc> RawVec<T, A> { /// Like `new`, but parameterized over the choice of allocator for /// the returned `RawVec`. pub const fn new_in(a: A) -> Self { - // FIXME(mark-i-m): remove bootstrapping cfgs these after a cycle - let cap = { - #[cfg(not(bootstrap))] - { if mem::size_of::<T>() == 0 { core::usize::MAX } else { 0 } } - - #[cfg(bootstrap)] - [0, !0][(mem::size_of::<T>() == 0) as usize] - }; + let cap = if mem::size_of::<T>() == 0 { core::usize::MAX } else { 0 }; // `Unique::empty()` doubles as "unallocated" and "zero-sized allocation". RawVec { |
