From 7c9445d4a78909e324c5190759d1a015e7a48990 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Wed, 30 Jun 2021 19:41:49 +0200 Subject: [PATCH] alloc: `RawVec::shrink` can be in `no_global_oom_handling`. Found in https://github.com/Rust-for-Linux/linux/pull/402. Signed-off-by: Miguel Ojeda --- library/alloc/src/raw_vec.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/library/alloc/src/raw_vec.rs b/library/alloc/src/raw_vec.rs index 2e2c9b76bd4..d11d4031f77 100644 --- a/library/alloc/src/raw_vec.rs +++ b/library/alloc/src/raw_vec.rs @@ -463,7 +463,6 @@ fn grow_exact(&mut self, len: usize, additional: usize) -> Result<(), TryReserve Ok(()) } - #[cfg(not(no_global_oom_handling))] fn shrink(&mut self, amount: usize) -> Result<(), TryReserveError> { assert!(amount <= self.capacity(), "Tried to shrink to a larger capacity");