Stabilize new_zeroed_alloc

This commit is contained in:
Thalia Archibald
2025-04-21 23:27:01 -07:00
parent 9cd918bcbb
commit 175afd7618
6 changed files with 9 additions and 44 deletions

View File

@@ -638,7 +638,7 @@ impl<T: Idx> ChunkedBitSet<T> {
};
#[cfg(not(feature = "nightly"))]
let mut words = {
// FIXME: unconditionally use `Rc::new_zeroed` once it is stable (#63291).
// FIXME: unconditionally use `Rc::new_zeroed` once it is stable (#129396).
let words = mem::MaybeUninit::<[Word; CHUNK_WORDS]>::zeroed();
// SAFETY: `words` can safely be all zeroes.
let words = unsafe { words.assume_init() };
@@ -704,7 +704,7 @@ impl<T: Idx> ChunkedBitSet<T> {
};
#[cfg(not(feature = "nightly"))]
let mut words = {
// FIXME: unconditionally use `Rc::new_zeroed` once it is stable (#63291).
// FIXME: unconditionally use `Rc::new_zeroed` once it is stable (#129396).
let words = mem::MaybeUninit::<[Word; CHUNK_WORDS]>::zeroed();
// SAFETY: `words` can safely be all zeroes.
let words = unsafe { words.assume_init() };