Skip to content

Commit 9e007e7

Browse files
authored
Rollup merge of #86755 - ojeda:shrink, r=Mark-Simulacrum
alloc: `RawVec<T, A>::shrink` can be in `no_global_oom_handling`. Found in Rust-for-Linux/linux#402. Signed-off-by: Miguel Ojeda <[email protected]>
2 parents 7714a9a + 7c9445d commit 9e007e7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

library/alloc/src/raw_vec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ impl<T, A: Allocator> RawVec<T, A> {
463463
Ok(())
464464
}
465465

466-
#[cfg(not(no_global_oom_handling))]
467466
fn shrink(&mut self, amount: usize) -> Result<(), TryReserveError> {
468467
assert!(amount <= self.capacity(), "Tried to shrink to a larger capacity");
469468

0 commit comments

Comments
 (0)