From ddc401e0bf4f972bc2916601797d12bb97c5f1dc Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 6 Jun 2016 23:05:39 +0300 Subject: update to 2016-06-06 --- liballoc/raw_vec.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'liballoc/raw_vec.rs') diff --git a/liballoc/raw_vec.rs b/liballoc/raw_vec.rs index c407cef..58c8411 100644 --- a/liballoc/raw_vec.rs +++ b/liballoc/raw_vec.rs @@ -147,6 +147,7 @@ impl RawVec { /// Gets the capacity of the allocation. /// /// This will always be `usize::MAX` if `T` is zero-sized. + #[inline(always)] pub fn cap(&self) -> usize { if mem::size_of::() == 0 { !0 @@ -577,9 +578,9 @@ impl Drop for RawVec { // * We don't overflow `usize::MAX` and actually allocate too little // // On 64-bit we just need to check for overflow since trying to allocate -// `> isize::MAX` bytes will surely fail. On 32-bit we need to add an extra -// guard for this in case we're running on a platform which can use all 4GB in -// user-space. e.g. PAE or x32 +// `> isize::MAX` bytes will surely fail. On 32-bit and 16-bit we need to add +// an extra guard for this in case we're running on a platform which can use +// all 4GB in user-space. e.g. PAE or x32 #[inline] fn alloc_guard(alloc_size: usize) { -- cgit v1.2.3