Skip to content

Commit 76b2237

Browse files
CoAlloc: Fixes
1 parent a93b530 commit 76b2237

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/alloc/src/slice.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ impl<T> [T] {
629629
#[inline]
630630
#[allow(unused_braces)]
631631
pub fn into_vec<A: Allocator>(self: Box<Self, A>) -> Vec<T, A>
632-
where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:
632+
where [(); { crate::meta_num_slots_default!(A) }]:
633633
{
634634
// N.B., see the `hack` module in this file for more details.
635635
hack::into_vec(self)
@@ -986,15 +986,15 @@ where
986986
#[cfg(not(no_global_oom_handling))]
987987
#[allow(unused_braces)]
988988
pub(crate) trait SpecCloneIntoVec<T, A: Allocator>
989-
where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:
989+
where [(); { crate::meta_num_slots_default!(A) }]:
990990
{
991991
fn clone_into(&self, target: &mut Vec<T, A>);
992992
}
993993

994994
#[cfg(not(no_global_oom_handling))]
995995
#[allow(unused_braces)]
996996
impl<T: Clone, A: Allocator> SpecCloneIntoVec<T, A> for [T]
997-
where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:
997+
where [(); { crate::meta_num_slots_default!(A) }]:
998998
{
999999
default fn clone_into(&self, target: &mut Vec<T, A>) {
10001000
// drop anything in target that will not be overwritten
@@ -1013,7 +1013,7 @@ where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:
10131013
#[cfg(not(no_global_oom_handling))]
10141014
#[allow(unused_braces)]
10151015
impl<T: Copy, A: Allocator> SpecCloneIntoVec<T, A> for [T]
1016-
where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:
1016+
where [(); { crate::meta_num_slots_default!(A) }]:
10171017
{
10181018
fn clone_into(&self, target: &mut Vec<T, A>) {
10191019
target.clear();

library/std/src/io/impls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ where
420420
/// Read is implemented for `VecDeque<u8>` by consuming bytes from the front of the `VecDeque`.
421421
#[stable(feature = "vecdeque_read_write", since = "1.63.0")]
422422
#[allow(unused_braces)]
423-
impl<A: Allocator, const _CO_ALLOC_PREF: CoAllocPref> Read for VecDeque<u8, A, _CO_ALLOC_PREF>
423+
impl<A: Allocator, const CO_ALLOC_PREF: CoAllocPref> Read for VecDeque<u8, A, CO_ALLOC_PREF>
424424
where
425425
[(); { meta_num_slots!(A, CO_ALLOC_PREF) }]:,
426426
{
@@ -448,7 +448,7 @@ where
448448
/// Write is implemented for `VecDeque<u8>` by appending to the `VecDeque`, growing it as needed.
449449
#[stable(feature = "vecdeque_read_write", since = "1.63.0")]
450450
#[allow(unused_braces)]
451-
impl<A: Allocator, const _CO_ALLOC_PREF: CoAllocPref> Write for VecDeque<u8, A, _CO_ALLOC_PREF>
451+
impl<A: Allocator, const CO_ALLOC_PREF: CoAllocPref> Write for VecDeque<u8, A, CO_ALLOC_PREF>
452452
where
453453
[(); { meta_num_slots!(A, CO_ALLOC_PREF) }]:,
454454
{

0 commit comments

Comments
 (0)