Skip to content

Commit cc1f135

Browse files
Minor; nightly still dies
1 parent 65936d9 commit cc1f135

File tree

1 file changed

+8
-5
lines changed
  • library/alloc/src/collections/vec_deque

1 file changed

+8
-5
lines changed

library/alloc/src/collections/vec_deque/mod.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,13 @@ where
158158
}
159159

160160
#[stable(feature = "rust1", since = "1.0.0")]
161-
impl<T, A: Allocator, const COOP_PREFERRED: bool> Default for VecDeque<T, A, COOP_PREFERRED> {
161+
impl<T, const COOP_PREFERRED: bool> Default for VecDeque<T, Global, COOP_PREFERRED>
162+
where
163+
[(); crate::co_alloc_metadata_num_slots_with_preference_global(COOP_PREFERRED)]:,
164+
{
162165
/// Creates an empty deque.
163166
#[inline]
164-
fn default() -> VecDeque<T, A, COOP_PREFERRED> {
167+
fn default() -> VecDeque<T, Global, COOP_PREFERRED> {
165168
VecDeque::new()
166169
}
167170
}
@@ -2976,10 +2979,10 @@ where
29762979
}
29772980

29782981
#[stable(feature = "std_collections_from_array", since = "1.56.0")]
2979-
impl<T, const N: usize, A: Allocator, const COOP_PREFERRED: bool> From<[T; N]>
2980-
for VecDeque<T, A, COOP_PREFERRED>
2982+
impl<T, const N: usize, const COOP_PREFERRED: bool> From<[T; N]>
2983+
for VecDeque<T, Global, COOP_PREFERRED>
29812984
where
2982-
[(); alloc::co_alloc_metadata_num_slots_with_preference_specific::<A>(COOP_PREFERRED)]:,
2985+
[(); crate::co_alloc_metadata_num_slots_with_preference_global(COOP_PREFERRED)]:,
29832986
{
29842987
/// Converts a `[T; N]` into a `VecDeque<T>`.
29852988
///

0 commit comments

Comments
 (0)