about summary refs log tree commit diff
path: root/library/alloc/src/raw_vec/tests.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-09 20:51:26 +0000
committerbors <bors@rust-lang.org>2024-03-09 20:51:26 +0000
commit2d24fe591f30386d6d5fc2bb941c78d7266bf10f (patch)
tree4d4014d245653353b1d590f532ec7eb0290a778f /library/alloc/src/raw_vec/tests.rs
parent25ee3c6a2f429a97ff4ad239e3f42409cd71fe0a (diff)
parent13ca978f914a2ffb212698e7fd69aaf10611fb8e (diff)
downloadrust-2d24fe591f30386d6d5fc2bb941c78d7266bf10f.tar.gz
rust-2d24fe591f30386d6d5fc2bb941c78d7266bf10f.zip
Auto merge of #122256 - Nadrieril:rollup-rc232xh, r=Nadrieril
Rollup of 8 pull requests

Successful merges:

 - #99153 (Add Read Impl for &Stdin)
 - #114655 (Make `impl<Fd: AsFd>` impl take `?Sized`)
 - #120504 (Vec::try_with_capacity)
 - #121280 (Implement MaybeUninit::fill{,_with,_from})
 - #121403 (impl From<TryReserveError> for io::Error)
 - #121526 (on the fly type casting for `build.rustc` and `build.cargo`)
 - #121584 (bump itertools to 0.12)
 - #121711 (Implement junction_point)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src/raw_vec/tests.rs')
-rw-r--r--library/alloc/src/raw_vec/tests.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/alloc/src/raw_vec/tests.rs b/library/alloc/src/raw_vec/tests.rs
index f8cada01c03..4194be53061 100644
--- a/library/alloc/src/raw_vec/tests.rs
+++ b/library/alloc/src/raw_vec/tests.rs
@@ -105,13 +105,14 @@ fn zst() {
     let v: RawVec<ZST> = RawVec::with_capacity_in(100, Global);
     zst_sanity(&v);
 
-    let v: RawVec<ZST> = RawVec::allocate_in(0, AllocInit::Uninitialized, Global);
+    let v: RawVec<ZST> = RawVec::try_allocate_in(0, AllocInit::Uninitialized, Global).unwrap();
     zst_sanity(&v);
 
-    let v: RawVec<ZST> = RawVec::allocate_in(100, AllocInit::Uninitialized, Global);
+    let v: RawVec<ZST> = RawVec::try_allocate_in(100, AllocInit::Uninitialized, Global).unwrap();
     zst_sanity(&v);
 
-    let mut v: RawVec<ZST> = RawVec::allocate_in(usize::MAX, AllocInit::Uninitialized, Global);
+    let mut v: RawVec<ZST> =
+        RawVec::try_allocate_in(usize::MAX, AllocInit::Uninitialized, Global).unwrap();
     zst_sanity(&v);
 
     // Check all these operations work as expected with zero-sized elements.