From b9f350cc70097fe048c1a8141a92a2412d9ab300 Mon Sep 17 00:00:00 2001 From: Peter Kehl Date: Tue, 14 Feb 2023 18:03:38 -0800 Subject: [PATCH] CoAlloc: Fixes --- library/alloc/src/slice.rs | 8 ++++---- library/std/src/io/impls.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index ffb250c56d008..145f4ec998232 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -629,7 +629,7 @@ impl [T] { #[inline] #[allow(unused_braces)] pub fn into_vec(self: Box) -> Vec - where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]: + where [(); { crate::meta_num_slots_default!(A) }]: { // N.B., see the `hack` module in this file for more details. hack::into_vec(self) @@ -986,7 +986,7 @@ where #[cfg(not(no_global_oom_handling))] #[allow(unused_braces)] pub(crate) trait SpecCloneIntoVec -where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]: +where [(); { crate::meta_num_slots_default!(A) }]: { fn clone_into(&self, target: &mut Vec); } @@ -994,7 +994,7 @@ where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]: #[cfg(not(no_global_oom_handling))] #[allow(unused_braces)] impl SpecCloneIntoVec for [T] -where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]: +where [(); { crate::meta_num_slots_default!(A) }]: { default fn clone_into(&self, target: &mut Vec) { // drop anything in target that will not be overwritten @@ -1013,7 +1013,7 @@ where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]: #[cfg(not(no_global_oom_handling))] #[allow(unused_braces)] impl SpecCloneIntoVec for [T] -where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]: +where [(); { crate::meta_num_slots_default!(A) }]: { fn clone_into(&self, target: &mut Vec) { target.clear(); diff --git a/library/std/src/io/impls.rs b/library/std/src/io/impls.rs index 561ec13038ee5..541f882d84ccf 100644 --- a/library/std/src/io/impls.rs +++ b/library/std/src/io/impls.rs @@ -420,7 +420,7 @@ where /// Read is implemented for `VecDeque` by consuming bytes from the front of the `VecDeque`. #[stable(feature = "vecdeque_read_write", since = "1.63.0")] #[allow(unused_braces)] -impl Read for VecDeque +impl Read for VecDeque where [(); { meta_num_slots!(A, CO_ALLOC_PREF) }]:, { @@ -448,7 +448,7 @@ where /// Write is implemented for `VecDeque` by appending to the `VecDeque`, growing it as needed. #[stable(feature = "vecdeque_read_write", since = "1.63.0")] #[allow(unused_braces)] -impl Write for VecDeque +impl Write for VecDeque where [(); { meta_num_slots!(A, CO_ALLOC_PREF) }]:, {