@@ -98,7 +98,7 @@ pub struct VecDeque<
9898 #[ unstable( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global ,
9999 const COOP_PREFERRED : bool = DEFAULT_COOP_PREFERRED ,
100100> where
101- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
101+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
102102{
103103 // `self[0]`, if it exists, is `buf[head]`.
104104 // `head < buf.capacity()`, unless `buf.capacity() == 0` when `head == 0`.
@@ -114,7 +114,7 @@ pub struct VecDeque<
114114impl < T : Clone , A : Allocator + Clone , const COOP_PREFERRED : bool > Clone
115115 for VecDeque < T , A , COOP_PREFERRED >
116116where
117- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
117+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
118118{
119119 fn clone ( & self ) -> Self {
120120 let mut deq = Self :: with_capacity_in ( self . len ( ) , self . allocator ( ) . clone ( ) ) ;
@@ -132,7 +132,7 @@ where
132132unsafe impl < #[ may_dangle] T , A : Allocator , const COOP_PREFERRED : bool > Drop
133133 for VecDeque < T , A , COOP_PREFERRED >
134134where
135- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
135+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
136136{
137137 fn drop ( & mut self ) {
138138 /// Runs the destructor for all items in the slice when it gets dropped (normally or
@@ -168,7 +168,7 @@ impl<T, A: Allocator, const COOP_PREFERRED: bool> Default for VecDeque<T, A, COO
168168
169169impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
170170where
171- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
171+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
172172{
173173 /// Marginally more convenient
174174 #[ inline]
@@ -460,15 +460,15 @@ where
460460 ) -> usize {
461461 struct Guard < ' a , T , A : Allocator , const COOP_PREFERRED : bool >
462462 where
463- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
463+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
464464 {
465465 deque : & ' a mut VecDeque < T , A , COOP_PREFERRED > ,
466466 written : usize ,
467467 }
468468
469469 impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > Drop for Guard < ' a , T , A , COOP_PREFERRED >
470470 where
471- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
471+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
472472 {
473473 fn drop ( & mut self ) {
474474 self . deque . len += self . written ;
@@ -549,7 +549,7 @@ where
549549
550550impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
551551where
552- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
552+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
553553{
554554 /// Creates an empty deque.
555555 ///
@@ -587,7 +587,7 @@ where
587587
588588impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
589589where
590- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
590+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
591591{
592592 /// Creates an empty deque.
593593 ///
@@ -2623,7 +2623,7 @@ where
26232623
26242624impl < T : Clone , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
26252625where
2626- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2626+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
26272627{
26282628 /// Modifies the deque in-place so that `len()` is equal to new_len,
26292629 /// either by removing excess elements from the back or by appending clones of `value`
@@ -2672,7 +2672,7 @@ fn wrap_index(logical_index: usize, capacity: usize) -> usize {
26722672impl < T : PartialEq , A : Allocator , const COOP_PREFERRED : bool > PartialEq
26732673 for VecDeque < T , A , COOP_PREFERRED >
26742674where
2675- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2675+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
26762676{
26772677 fn eq ( & self , other : & Self ) -> bool {
26782678 if self . len != other. len ( ) {
@@ -2713,7 +2713,7 @@ where
27132713
27142714#[ stable( feature = "rust1" , since = "1.0.0" ) ]
27152715impl < T : Eq , A : Allocator , const COOP_PREFERRED : bool > Eq for VecDeque < T , A , COOP_PREFERRED > where
2716- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] :
2716+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] :
27172717{
27182718}
27192719
@@ -2728,7 +2728,7 @@ __impl_slice_eq1! { [const N: usize] VecDeque<T, A, COOP_PREFERRED>, &mut [U; N]
27282728impl < T : PartialOrd , A : Allocator , const COOP_PREFERRED : bool > PartialOrd
27292729 for VecDeque < T , A , COOP_PREFERRED >
27302730where
2731- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2731+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
27322732{
27332733 fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
27342734 self . iter ( ) . partial_cmp ( other. iter ( ) )
@@ -2738,7 +2738,7 @@ where
27382738#[ stable( feature = "rust1" , since = "1.0.0" ) ]
27392739impl < T : Ord , A : Allocator , const COOP_PREFERRED : bool > Ord for VecDeque < T , A , COOP_PREFERRED >
27402740where
2741- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2741+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
27422742{
27432743 #[ inline]
27442744 fn cmp ( & self , other : & Self ) -> Ordering {
@@ -2749,7 +2749,7 @@ where
27492749#[ stable( feature = "rust1" , since = "1.0.0" ) ]
27502750impl < T : Hash , A : Allocator , const COOP_PREFERRED : bool > Hash for VecDeque < T , A , COOP_PREFERRED >
27512751where
2752- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2752+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
27532753{
27542754 fn hash < H : Hasher > ( & self , state : & mut H ) {
27552755 state. write_length_prefix ( self . len ) ;
@@ -2766,7 +2766,7 @@ where
27662766#[ stable( feature = "rust1" , since = "1.0.0" ) ]
27672767impl < T , A : Allocator , const COOP_PREFERRED : bool > Index < usize > for VecDeque < T , A , COOP_PREFERRED >
27682768where
2769- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2769+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
27702770{
27712771 type Output = T ;
27722772
@@ -2779,7 +2779,7 @@ where
27792779#[ stable( feature = "rust1" , since = "1.0.0" ) ]
27802780impl < T , A : Allocator , const COOP_PREFERRED : bool > IndexMut < usize > for VecDeque < T , A , COOP_PREFERRED >
27812781where
2782- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2782+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
27832783{
27842784 #[ inline]
27852785 fn index_mut ( & mut self , index : usize ) -> & mut T {
@@ -2790,7 +2790,7 @@ where
27902790#[ stable( feature = "rust1" , since = "1.0.0" ) ]
27912791impl < T , A : Allocator , const COOP_PREFERRED : bool > FromIterator < T > for VecDeque < T , A , COOP_PREFERRED >
27922792where
2793- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2793+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
27942794{
27952795 fn from_iter < I : IntoIterator < Item = T > > ( iter : I ) -> VecDeque < T , Global , COOP_PREFERRED > {
27962796 SpecFromIter :: spec_from_iter ( iter. into_iter ( ) )
@@ -2800,7 +2800,7 @@ where
28002800#[ stable( feature = "rust1" , since = "1.0.0" ) ]
28012801impl < T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator for VecDeque < T , A , COOP_PREFERRED >
28022802where
2803- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2803+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
28042804{
28052805 type Item = T ;
28062806 type IntoIter = IntoIter < T , A > ;
@@ -2816,7 +2816,7 @@ where
28162816impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
28172817 for & ' a VecDeque < T , A , COOP_PREFERRED >
28182818where
2819- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2819+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
28202820{
28212821 type Item = & ' a T ;
28222822 type IntoIter = Iter < ' a , T > ;
@@ -2830,7 +2830,7 @@ where
28302830impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
28312831 for & ' a mut VecDeque < T , A , COOP_PREFERRED >
28322832where
2833- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2833+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
28342834{
28352835 type Item = & ' a mut T ;
28362836 type IntoIter = IterMut < ' a , T > ;
@@ -2843,7 +2843,7 @@ where
28432843#[ stable( feature = "rust1" , since = "1.0.0" ) ]
28442844impl < T , A : Allocator , const COOP_PREFERRED : bool > Extend < T > for VecDeque < T , A , COOP_PREFERRED >
28452845where
2846- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2846+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
28472847{
28482848 fn extend < I : IntoIterator < Item = T > > ( & mut self , iter : I ) {
28492849 <Self as SpecExtend < T , I :: IntoIter > >:: spec_extend ( self , iter. into_iter ( ) ) ;
@@ -2864,7 +2864,7 @@ where
28642864impl < ' a , T : ' a + Copy , A : Allocator , const COOP_PREFERRED : bool > Extend < & ' a T >
28652865 for VecDeque < T , A , COOP_PREFERRED >
28662866where
2867- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2867+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
28682868{
28692869 fn extend < I : IntoIterator < Item = & ' a T > > ( & mut self , iter : I ) {
28702870 self . spec_extend ( iter. into_iter ( ) ) ;
@@ -2885,7 +2885,7 @@ where
28852885impl < T : fmt:: Debug , A : Allocator , const COOP_PREFERRED : bool > fmt:: Debug
28862886 for VecDeque < T , A , COOP_PREFERRED >
28872887where
2888- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2888+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
28892889{
28902890 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
28912891 f. debug_list ( ) . entries ( self . iter ( ) ) . finish ( )
@@ -2896,7 +2896,7 @@ where
28962896impl < T , A : Allocator , const COOP_PREFERRED : bool > From < Vec < T , A , COOP_PREFERRED > >
28972897 for VecDeque < T , A , COOP_PREFERRED >
28982898where
2899- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2899+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
29002900{
29012901 /// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
29022902 ///
@@ -2909,7 +2909,9 @@ where
29092909 #[ inline]
29102910 fn from < const OTHER_COOP_PREFERRED : bool > ( other : Vec < T , A , OTHER_COOP_PREFERRED > ) -> Self
29112911 where
2912- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( OTHER_COOP_PREFERRED ) ] : ,
2912+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > (
2913+ OTHER_COOP_PREFERRED ,
2914+ ) ] : ,
29132915 {
29142916 let ( ptr, len, cap, alloc) = other. into_raw_parts_with_alloc ( ) ;
29152917 Self { head : 0 , len, buf : unsafe { RawVec :: from_raw_parts_in ( ptr, cap, alloc) } }
@@ -2920,7 +2922,7 @@ where
29202922impl < T , A : Allocator , const COOP_PREFERRED : bool > From < VecDeque < T , A , COOP_PREFERRED > >
29212923 for Vec < T , A , COOP_PREFERRED >
29222924where
2923- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2925+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
29242926{
29252927 /// Turn a [`VecDeque<T>`] into a [`Vec<T>`].
29262928 ///
@@ -2976,7 +2978,7 @@ where
29762978impl < T , const N : usize , A : Allocator , const COOP_PREFERRED : bool > From < [ T ; N ] >
29772979 for VecDeque < T , A , COOP_PREFERRED >
29782980where
2979- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2981+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
29802982{
29812983 /// Converts a `[T; N]` into a `VecDeque<T>`.
29822984 ///
0 commit comments