about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/raw_vec.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs
index 6ca668fda59..eb25ae17511 100644
--- a/src/liballoc/raw_vec.rs
+++ b/src/liballoc/raw_vec.rs
@@ -65,7 +65,7 @@ impl<T, A: Alloc> RawVec<T, A> {
         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],
+            cap: [0, !0][(mem::size_of::<T>() == 0) as usize],
             a,
         }
     }