@@ -98,7 +98,7 @@ pub struct VecDeque<
98
98
#[ unstable( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global ,
99
99
const COOP_PREFERRED : bool = DEFAULT_COOP_PREFERRED ,
100
100
> 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 ) ] : ,
102
102
{
103
103
// `self[0]`, if it exists, is `buf[head]`.
104
104
// `head < buf.capacity()`, unless `buf.capacity() == 0` when `head == 0`.
@@ -114,7 +114,7 @@ pub struct VecDeque<
114
114
impl < T : Clone , A : Allocator + Clone , const COOP_PREFERRED : bool > Clone
115
115
for VecDeque < T , A , COOP_PREFERRED >
116
116
where
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 ) ] : ,
118
118
{
119
119
fn clone ( & self ) -> Self {
120
120
let mut deq = Self :: with_capacity_in ( self . len ( ) , self . allocator ( ) . clone ( ) ) ;
@@ -132,7 +132,7 @@ where
132
132
unsafe impl < #[ may_dangle] T , A : Allocator , const COOP_PREFERRED : bool > Drop
133
133
for VecDeque < T , A , COOP_PREFERRED >
134
134
where
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 ) ] : ,
136
136
{
137
137
fn drop ( & mut self ) {
138
138
/// 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
168
168
169
169
impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
170
170
where
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 ) ] : ,
172
172
{
173
173
/// Marginally more convenient
174
174
#[ inline]
@@ -460,15 +460,15 @@ where
460
460
) -> usize {
461
461
struct Guard < ' a , T , A : Allocator , const COOP_PREFERRED : bool >
462
462
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 ) ] : ,
464
464
{
465
465
deque : & ' a mut VecDeque < T , A , COOP_PREFERRED > ,
466
466
written : usize ,
467
467
}
468
468
469
469
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > Drop for Guard < ' a , T , A , COOP_PREFERRED >
470
470
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 ) ] : ,
472
472
{
473
473
fn drop ( & mut self ) {
474
474
self . deque . len += self . written ;
@@ -549,7 +549,7 @@ where
549
549
550
550
impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
551
551
where
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 ) ] : ,
553
553
{
554
554
/// Creates an empty deque.
555
555
///
@@ -588,7 +588,7 @@ where
588
588
589
589
impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
590
590
where
591
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
591
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
592
592
{
593
593
/// Creates an empty deque.
594
594
///
@@ -2624,7 +2624,7 @@ where
2624
2624
2625
2625
impl < T : Clone , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
2626
2626
where
2627
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2627
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2628
2628
{
2629
2629
/// Modifies the deque in-place so that `len()` is equal to new_len,
2630
2630
/// either by removing excess elements from the back or by appending clones of `value`
@@ -2673,7 +2673,7 @@ fn wrap_index(logical_index: usize, capacity: usize) -> usize {
2673
2673
impl < T : PartialEq , A : Allocator , const COOP_PREFERRED : bool > PartialEq
2674
2674
for VecDeque < T , A , COOP_PREFERRED >
2675
2675
where
2676
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2676
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2677
2677
{
2678
2678
fn eq ( & self , other : & Self ) -> bool {
2679
2679
if self . len != other. len ( ) {
@@ -2714,7 +2714,7 @@ where
2714
2714
2715
2715
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2716
2716
impl < T : Eq , A : Allocator , const COOP_PREFERRED : bool > Eq for VecDeque < T , A , COOP_PREFERRED > where
2717
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] :
2717
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] :
2718
2718
{
2719
2719
}
2720
2720
@@ -2729,7 +2729,7 @@ __impl_slice_eq1! { [const N: usize] VecDeque<T, A, COOP_PREFERRED>, &mut [U; N]
2729
2729
impl < T : PartialOrd , A : Allocator , const COOP_PREFERRED : bool > PartialOrd
2730
2730
for VecDeque < T , A , COOP_PREFERRED >
2731
2731
where
2732
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2732
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2733
2733
{
2734
2734
fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
2735
2735
self . iter ( ) . partial_cmp ( other. iter ( ) )
@@ -2739,7 +2739,7 @@ where
2739
2739
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2740
2740
impl < T : Ord , A : Allocator , const COOP_PREFERRED : bool > Ord for VecDeque < T , A , COOP_PREFERRED >
2741
2741
where
2742
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2742
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2743
2743
{
2744
2744
#[ inline]
2745
2745
fn cmp ( & self , other : & Self ) -> Ordering {
@@ -2750,7 +2750,7 @@ where
2750
2750
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2751
2751
impl < T : Hash , A : Allocator , const COOP_PREFERRED : bool > Hash for VecDeque < T , A , COOP_PREFERRED >
2752
2752
where
2753
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2753
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2754
2754
{
2755
2755
fn hash < H : Hasher > ( & self , state : & mut H ) {
2756
2756
state. write_length_prefix ( self . len ) ;
@@ -2767,7 +2767,7 @@ where
2767
2767
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2768
2768
impl < T , A : Allocator , const COOP_PREFERRED : bool > Index < usize > for VecDeque < T , A , COOP_PREFERRED >
2769
2769
where
2770
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2770
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2771
2771
{
2772
2772
type Output = T ;
2773
2773
@@ -2780,7 +2780,7 @@ where
2780
2780
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2781
2781
impl < T , A : Allocator , const COOP_PREFERRED : bool > IndexMut < usize > for VecDeque < T , A , COOP_PREFERRED >
2782
2782
where
2783
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2783
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2784
2784
{
2785
2785
#[ inline]
2786
2786
fn index_mut ( & mut self , index : usize ) -> & mut T {
@@ -2791,7 +2791,7 @@ where
2791
2791
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2792
2792
impl < T , A : Allocator , const COOP_PREFERRED : bool > FromIterator < T > for VecDeque < T , A , COOP_PREFERRED >
2793
2793
where
2794
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2794
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2795
2795
{
2796
2796
fn from_iter < I : IntoIterator < Item = T > > ( iter : I ) -> VecDeque < T , Global , COOP_PREFERRED > {
2797
2797
SpecFromIter :: spec_from_iter ( iter. into_iter ( ) )
@@ -2801,7 +2801,7 @@ where
2801
2801
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2802
2802
impl < T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator for VecDeque < T , A , COOP_PREFERRED >
2803
2803
where
2804
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2804
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2805
2805
{
2806
2806
type Item = T ;
2807
2807
type IntoIter = IntoIter < T , A > ;
@@ -2817,7 +2817,7 @@ where
2817
2817
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
2818
2818
for & ' a VecDeque < T , A , COOP_PREFERRED >
2819
2819
where
2820
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2820
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2821
2821
{
2822
2822
type Item = & ' a T ;
2823
2823
type IntoIter = Iter < ' a , T > ;
@@ -2831,7 +2831,7 @@ where
2831
2831
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
2832
2832
for & ' a mut VecDeque < T , A , COOP_PREFERRED >
2833
2833
where
2834
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2834
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2835
2835
{
2836
2836
type Item = & ' a mut T ;
2837
2837
type IntoIter = IterMut < ' a , T > ;
@@ -2844,7 +2844,7 @@ where
2844
2844
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2845
2845
impl < T , A : Allocator , const COOP_PREFERRED : bool > Extend < T > for VecDeque < T , A , COOP_PREFERRED >
2846
2846
where
2847
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2847
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2848
2848
{
2849
2849
fn extend < I : IntoIterator < Item = T > > ( & mut self , iter : I ) {
2850
2850
<Self as SpecExtend < T , I :: IntoIter > >:: spec_extend ( self , iter. into_iter ( ) ) ;
@@ -2865,7 +2865,7 @@ where
2865
2865
impl < ' a , T : ' a + Copy , A : Allocator , const COOP_PREFERRED : bool > Extend < & ' a T >
2866
2866
for VecDeque < T , A , COOP_PREFERRED >
2867
2867
where
2868
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2868
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2869
2869
{
2870
2870
fn extend < I : IntoIterator < Item = & ' a T > > ( & mut self , iter : I ) {
2871
2871
self . spec_extend ( iter. into_iter ( ) ) ;
@@ -2886,7 +2886,7 @@ where
2886
2886
impl < T : fmt:: Debug , A : Allocator , const COOP_PREFERRED : bool > fmt:: Debug
2887
2887
for VecDeque < T , A , COOP_PREFERRED >
2888
2888
where
2889
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2889
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2890
2890
{
2891
2891
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
2892
2892
f. debug_list ( ) . entries ( self . iter ( ) ) . finish ( )
@@ -2897,7 +2897,7 @@ where
2897
2897
impl < T , A : Allocator , const COOP_PREFERRED : bool > From < Vec < T , A , COOP_PREFERRED > >
2898
2898
for VecDeque < T , A , COOP_PREFERRED >
2899
2899
where
2900
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2900
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2901
2901
{
2902
2902
/// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
2903
2903
///
@@ -2910,7 +2910,9 @@ where
2910
2910
#[ inline]
2911
2911
fn from < const OTHER_COOP_PREFERRED : bool > ( other : Vec < T , A , OTHER_COOP_PREFERRED > ) -> Self
2912
2912
where
2913
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( OTHER_COOP_PREFERRED ) ] : ,
2913
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > (
2914
+ OTHER_COOP_PREFERRED ,
2915
+ ) ] : ,
2914
2916
{
2915
2917
let ( ptr, len, cap, alloc) = other. into_raw_parts_with_alloc ( ) ;
2916
2918
Self { head : 0 , len, buf : unsafe { RawVec :: from_raw_parts_in ( ptr, cap, alloc) } }
@@ -2921,7 +2923,7 @@ where
2921
2923
impl < T , A : Allocator , const COOP_PREFERRED : bool > From < VecDeque < T , A , COOP_PREFERRED > >
2922
2924
for Vec < T , A , COOP_PREFERRED >
2923
2925
where
2924
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2926
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2925
2927
{
2926
2928
/// Turn a [`VecDeque<T>`] into a [`Vec<T>`].
2927
2929
///
@@ -2977,7 +2979,7 @@ where
2977
2979
impl < T , const N : usize , A : Allocator , const COOP_PREFERRED : bool > From < [ T ; N ] >
2978
2980
for VecDeque < T , A , COOP_PREFERRED >
2979
2981
where
2980
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2982
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2981
2983
{
2982
2984
/// Converts a `[T; N]` into a `VecDeque<T>`.
2983
2985
///
0 commit comments