about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2019-11-25 18:14:46 -0600
committerMark Mansi <markm@cs.wisc.edu>2019-12-18 20:19:05 -0600
commitbaaf864e07a8b8b99ed548c08606c1c7da74256b (patch)
treefc32acc1e229d749129c93f4b794bb316efe5208 /src/liballoc
parent3ec3fca414f62cb3172b9324fe7aaa516c71b4e9 (diff)
downloadrust-baaf864e07a8b8b99ed548c08606c1c7da74256b.tar.gz
rust-baaf864e07a8b8b99ed548c08606c1c7da74256b.zip
use usize::MAX instead of !0
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 ce192a7450c..0d6fb259574 100644
--- a/src/liballoc/raw_vec.rs
+++ b/src/liballoc/raw_vec.rs
@@ -54,7 +54,7 @@ impl<T, A: Alloc> RawVec<T, A> {
     pub const fn new_in(a: A) -> Self {
         let cap = {
             #[cfg(not(bootstrap))]
-            { if mem::size_of::<T>() == 0 { !0 } else { 0 } }
+            { if mem::size_of::<T>() == 0 { usize::MAX } else { 0 } }
 
             #[cfg(bootstrap)]
             [0, !0][(mem::size_of::<T>() == 0) as usize]