Skip to content

Commit eb821a2

Browse files
CoAlloc: Minor VecDeque. ICE
1 parent b07964c commit eb821a2

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
}
@@ -2978,10 +2981,10 @@ where
29782981
}
29792982

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

0 commit comments

Comments
 (0)