@@ -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
///
@@ -587,7 +587,7 @@ where
587
587
588
588
impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
589
589
where
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 ) ] : ,
591
591
{
592
592
/// Creates an empty deque.
593
593
///
@@ -2623,7 +2623,7 @@ where
2623
2623
2624
2624
impl < T : Clone , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
2625
2625
where
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 ) ] : ,
2627
2627
{
2628
2628
/// Modifies the deque in-place so that `len()` is equal to new_len,
2629
2629
/// 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 {
2672
2672
impl < T : PartialEq , A : Allocator , const COOP_PREFERRED : bool > PartialEq
2673
2673
for VecDeque < T , A , COOP_PREFERRED >
2674
2674
where
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 ) ] : ,
2676
2676
{
2677
2677
fn eq ( & self , other : & Self ) -> bool {
2678
2678
if self . len != other. len ( ) {
@@ -2713,7 +2713,7 @@ where
2713
2713
2714
2714
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2715
2715
impl < 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 ) ] :
2717
2717
{
2718
2718
}
2719
2719
@@ -2728,7 +2728,7 @@ __impl_slice_eq1! { [const N: usize] VecDeque<T, A, COOP_PREFERRED>, &mut [U; N]
2728
2728
impl < T : PartialOrd , A : Allocator , const COOP_PREFERRED : bool > PartialOrd
2729
2729
for VecDeque < T , A , COOP_PREFERRED >
2730
2730
where
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 ) ] : ,
2732
2732
{
2733
2733
fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
2734
2734
self . iter ( ) . partial_cmp ( other. iter ( ) )
@@ -2738,7 +2738,7 @@ where
2738
2738
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2739
2739
impl < T : Ord , A : Allocator , const COOP_PREFERRED : bool > Ord for VecDeque < T , A , COOP_PREFERRED >
2740
2740
where
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 ) ] : ,
2742
2742
{
2743
2743
#[ inline]
2744
2744
fn cmp ( & self , other : & Self ) -> Ordering {
@@ -2749,7 +2749,7 @@ where
2749
2749
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2750
2750
impl < T : Hash , A : Allocator , const COOP_PREFERRED : bool > Hash for VecDeque < T , A , COOP_PREFERRED >
2751
2751
where
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 ) ] : ,
2753
2753
{
2754
2754
fn hash < H : Hasher > ( & self , state : & mut H ) {
2755
2755
state. write_length_prefix ( self . len ) ;
@@ -2766,7 +2766,7 @@ where
2766
2766
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2767
2767
impl < T , A : Allocator , const COOP_PREFERRED : bool > Index < usize > for VecDeque < T , A , COOP_PREFERRED >
2768
2768
where
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 ) ] : ,
2770
2770
{
2771
2771
type Output = T ;
2772
2772
@@ -2779,7 +2779,7 @@ where
2779
2779
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2780
2780
impl < T , A : Allocator , const COOP_PREFERRED : bool > IndexMut < usize > for VecDeque < T , A , COOP_PREFERRED >
2781
2781
where
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 ) ] : ,
2783
2783
{
2784
2784
#[ inline]
2785
2785
fn index_mut ( & mut self , index : usize ) -> & mut T {
@@ -2790,7 +2790,7 @@ where
2790
2790
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2791
2791
impl < T , A : Allocator , const COOP_PREFERRED : bool > FromIterator < T > for VecDeque < T , A , COOP_PREFERRED >
2792
2792
where
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 ) ] : ,
2794
2794
{
2795
2795
fn from_iter < I : IntoIterator < Item = T > > ( iter : I ) -> VecDeque < T , Global , COOP_PREFERRED > {
2796
2796
SpecFromIter :: spec_from_iter ( iter. into_iter ( ) )
@@ -2800,7 +2800,7 @@ where
2800
2800
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2801
2801
impl < T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator for VecDeque < T , A , COOP_PREFERRED >
2802
2802
where
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 ) ] : ,
2804
2804
{
2805
2805
type Item = T ;
2806
2806
type IntoIter = IntoIter < T , A > ;
@@ -2816,7 +2816,7 @@ where
2816
2816
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
2817
2817
for & ' a VecDeque < T , A , COOP_PREFERRED >
2818
2818
where
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 ) ] : ,
2820
2820
{
2821
2821
type Item = & ' a T ;
2822
2822
type IntoIter = Iter < ' a , T > ;
@@ -2830,7 +2830,7 @@ where
2830
2830
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
2831
2831
for & ' a mut VecDeque < T , A , COOP_PREFERRED >
2832
2832
where
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 ) ] : ,
2834
2834
{
2835
2835
type Item = & ' a mut T ;
2836
2836
type IntoIter = IterMut < ' a , T > ;
@@ -2843,7 +2843,7 @@ where
2843
2843
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2844
2844
impl < T , A : Allocator , const COOP_PREFERRED : bool > Extend < T > for VecDeque < T , A , COOP_PREFERRED >
2845
2845
where
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 ) ] : ,
2847
2847
{
2848
2848
fn extend < I : IntoIterator < Item = T > > ( & mut self , iter : I ) {
2849
2849
<Self as SpecExtend < T , I :: IntoIter > >:: spec_extend ( self , iter. into_iter ( ) ) ;
@@ -2864,7 +2864,7 @@ where
2864
2864
impl < ' a , T : ' a + Copy , A : Allocator , const COOP_PREFERRED : bool > Extend < & ' a T >
2865
2865
for VecDeque < T , A , COOP_PREFERRED >
2866
2866
where
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 ) ] : ,
2868
2868
{
2869
2869
fn extend < I : IntoIterator < Item = & ' a T > > ( & mut self , iter : I ) {
2870
2870
self . spec_extend ( iter. into_iter ( ) ) ;
@@ -2885,7 +2885,7 @@ where
2885
2885
impl < T : fmt:: Debug , A : Allocator , const COOP_PREFERRED : bool > fmt:: Debug
2886
2886
for VecDeque < T , A , COOP_PREFERRED >
2887
2887
where
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 ) ] : ,
2889
2889
{
2890
2890
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
2891
2891
f. debug_list ( ) . entries ( self . iter ( ) ) . finish ( )
@@ -2896,7 +2896,7 @@ where
2896
2896
impl < T , A : Allocator , const COOP_PREFERRED : bool > From < Vec < T , A , COOP_PREFERRED > >
2897
2897
for VecDeque < T , A , COOP_PREFERRED >
2898
2898
where
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 ) ] : ,
2900
2900
{
2901
2901
/// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
2902
2902
///
@@ -2909,7 +2909,9 @@ where
2909
2909
#[ inline]
2910
2910
fn from < const OTHER_COOP_PREFERRED : bool > ( other : Vec < T , A , OTHER_COOP_PREFERRED > ) -> Self
2911
2911
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
+ ) ] : ,
2913
2915
{
2914
2916
let ( ptr, len, cap, alloc) = other. into_raw_parts_with_alloc ( ) ;
2915
2917
Self { head : 0 , len, buf : unsafe { RawVec :: from_raw_parts_in ( ptr, cap, alloc) } }
@@ -2920,7 +2922,7 @@ where
2920
2922
impl < T , A : Allocator , const COOP_PREFERRED : bool > From < VecDeque < T , A , COOP_PREFERRED > >
2921
2923
for Vec < T , A , COOP_PREFERRED >
2922
2924
where
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 ) ] : ,
2924
2926
{
2925
2927
/// Turn a [`VecDeque<T>`] into a [`Vec<T>`].
2926
2928
///
@@ -2976,7 +2978,7 @@ where
2976
2978
impl < T , const N : usize , A : Allocator , const COOP_PREFERRED : bool > From < [ T ; N ] >
2977
2979
for VecDeque < T , A , COOP_PREFERRED >
2978
2980
where
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 ) ] : ,
2980
2982
{
2981
2983
/// Converts a `[T; N]` into a `VecDeque<T>`.
2982
2984
///
0 commit comments