@@ -160,14 +160,12 @@ where
160160
161161#[ stable( feature = "rust1" , since = "1.0.0" ) ]
162162#[ allow( unused_braces) ]
163- impl < T , const CO_ALLOC_PREF : CoAllocPref > Default for VecDeque < T , Global , CO_ALLOC_PREF >
164- where
165- [ ( ) ; { meta_num_slots_global ! ( CO_ALLOC_PREF ) } ] : ,
163+ impl < T > Default for VecDeque < T >
166164{
167165 /// Creates an empty deque.
168166 #[ inline]
169- fn default ( ) -> VecDeque < T , Global , CO_ALLOC_PREF > {
170- VecDeque :: < T , Global , CO_ALLOC_PREF > :: new ( )
167+ fn default ( ) -> VecDeque < T > {
168+ VecDeque :: < T > :: new ( )
171169 }
172170}
173171
@@ -554,12 +552,7 @@ where
554552 }
555553}
556554
557- #[ allow( unused_braces) ]
558- impl < T , A : Allocator , const CO_ALLOC_PREF : CoAllocPref > VecDeque < T , A , CO_ALLOC_PREF >
559- where
560- [ ( ) ; { crate :: meta_num_slots!( A , CO_ALLOC_PREF ) } ] : ,
561- [ ( ) ; { crate :: meta_num_slots_global!( CO_ALLOC_PREF ) } ] : ,
562- {
555+ impl < T > VecDeque < T > {
563556 /// Creates an empty deque.
564557 ///
565558 /// # Examples
@@ -573,14 +566,13 @@ where
573566 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
574567 #[ rustc_const_stable( feature = "const_vec_deque_new" , since = "1.68.0" ) ]
575568 #[ must_use]
576- pub const fn new ( ) -> VecDeque < T , Global , CO_ALLOC_PREF >
577- where
578- [ ( ) ; { crate :: meta_num_slots_global!( CO_ALLOC_PREF ) } ] : ,
569+ #[ allow( unused_braces) ]
570+ pub const fn new ( ) -> VecDeque < T , Global , { CO_ALLOC_PREF_DEFAULT ! ( ) } >
579571 {
580572 // FIXME: This should just be `VecDeque::new_in(Global)` once that hits stable.
581573 VecDeque { head : 0 , len : 0 , buf : RawVec :: NEW }
582574 }
583-
575+
584576 /// Creates an empty deque with space for at least `capacity` elements.
585577 ///
586578 /// # Examples
@@ -593,8 +585,9 @@ where
593585 #[ inline]
594586 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
595587 #[ must_use]
596- pub fn with_capacity ( capacity : usize ) -> VecDeque < T , Global , CO_ALLOC_PREF > {
597- VecDeque :: < T , Global , CO_ALLOC_PREF > :: with_capacity_in ( capacity, Global )
588+ #[ allow( unused_braces) ]
589+ pub fn with_capacity ( capacity : usize ) -> VecDeque < T , Global , { CO_ALLOC_PREF_DEFAULT ! ( ) } > {
590+ VecDeque :: < T , Global , { CO_ALLOC_PREF_DEFAULT ! ( ) } > :: with_capacity_in ( capacity, Global )
598591 }
599592}
600593
@@ -3006,9 +2999,7 @@ where
30062999
30073000#[ stable( feature = "std_collections_from_array" , since = "1.56.0" ) ]
30083001#[ allow( unused_braces) ]
3009- impl < T , const N : usize , const CO_ALLOC_PREF : CoAllocPref > From < [ T ; N ] > for VecDeque < T , Global , CO_ALLOC_PREF >
3010- where
3011- [ ( ) ; { meta_num_slots_global ! ( CO_ALLOC_PREF ) } ] : ,
3002+ impl < T , const N : usize > From < [ T ; N ] > for VecDeque < T >
30123003{
30133004 /// Converts a `[T; N]` into a `VecDeque<T>`.
30143005 ///
@@ -3020,7 +3011,7 @@ where
30203011 /// assert_eq!(deq1, deq2);
30213012 /// ```
30223013 fn from ( arr : [ T ; N ] ) -> Self {
3023- let mut deq = VecDeque :: < T , Global , CO_ALLOC_PREF > :: with_capacity ( N ) ;
3014+ let mut deq = VecDeque :: < T > :: with_capacity ( N ) ;
30243015 let arr = ManuallyDrop :: new ( arr) ;
30253016 if !<T >:: IS_ZST {
30263017 // SAFETY: VecDeque::with_capacity ensures that there is enough capacity.
0 commit comments