@@ -166,7 +166,7 @@ where
166
166
/// Creates an empty deque.
167
167
#[ inline]
168
168
fn default ( ) -> VecDeque < T , Global , COOP_PREFERRED > {
169
- VecDeque :: new ( )
169
+ VecDeque :: < T , Global , COOP_PREFERRED > :: new ( )
170
170
}
171
171
}
172
172
@@ -554,6 +554,7 @@ where
554
554
impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
555
555
where
556
556
[ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
557
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < Global > ( COOP_PREFERRED ) ] : ,
557
558
{
558
559
/// Creates an empty deque.
559
560
///
@@ -587,8 +588,8 @@ where
587
588
#[ inline]
588
589
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
589
590
#[ must_use]
590
- pub fn with_capacity ( capacity : usize ) -> VecDeque < T , A , COOP_PREFERRED > {
591
- Self :: with_capacity_in ( capacity, Global )
591
+ pub fn with_capacity ( capacity : usize ) -> VecDeque < T , Global , COOP_PREFERRED > {
592
+ VecDeque :: < T , Global , COOP_PREFERRED > :: with_capacity_in ( capacity, Global )
592
593
}
593
594
}
594
595
@@ -1402,7 +1403,7 @@ where
1402
1403
/// ```
1403
1404
#[ inline]
1404
1405
#[ stable( feature = "drain" , since = "1.6.0" ) ]
1405
- pub fn drain < R > ( & mut self , range : R ) -> Drain < ' _ , T , A >
1406
+ pub fn drain < R > ( & mut self , range : R ) -> Drain < ' _ , T , A , COOP_PREFERRED >
1406
1407
where
1407
1408
R : RangeBounds < usize > ,
1408
1409
[ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( SHORT_TERM_VEC_PREFERS_COOP ! ( ) ) ] : ,
@@ -2923,7 +2924,7 @@ where
2923
2924
fn from ( other : Vec < T , A , OTHER_COOP_PREFERRED > ) -> Self
2924
2925
{
2925
2926
let ( ptr, len, cap, alloc) = other. into_raw_parts_with_alloc ( ) ;
2926
- Self { head : 0 , len, buf : unsafe { RawVec :: from_raw_parts_in ( ptr, cap, alloc) } }
2927
+ Self { head : 0 , len, buf : unsafe { RawVec :: < T , A , COOP_PREFERRED > :: from_raw_parts_in ( ptr, cap, alloc) } }
2927
2928
}
2928
2929
}
2929
2930
@@ -2982,7 +2983,7 @@ where
2982
2983
ptr:: copy ( buf. add ( other. head ) , buf, len) ;
2983
2984
}
2984
2985
// @FIXME: COOP
2985
- Vec :: from_raw_parts_in ( buf, len, cap, alloc)
2986
+ Vec :: < T , A , COOP_PREFERRED > :: from_raw_parts_in ( buf, len, cap, alloc)
2986
2987
}
2987
2988
}
2988
2989
}
@@ -3003,7 +3004,7 @@ where
3003
3004
/// assert_eq!(deq1, deq2);
3004
3005
/// ```
3005
3006
fn from ( arr : [ T ; N ] ) -> Self {
3006
- let mut deq = VecDeque :: with_capacity ( N ) ;
3007
+ let mut deq = VecDeque :: < T , Global , COOP_PREFERRED > :: with_capacity ( N ) ;
3007
3008
let arr = ManuallyDrop :: new ( arr) ;
3008
3009
if !<T >:: IS_ZST {
3009
3010
// SAFETY: VecDeque::with_capacity ensures that there is enough capacity.
0 commit comments