@@ -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
///
@@ -2626,7 +2626,7 @@ where
2626
2626
2627
2627
impl < T : Clone , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
2628
2628
where
2629
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2629
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2630
2630
{
2631
2631
/// Modifies the deque in-place so that `len()` is equal to new_len,
2632
2632
/// either by removing excess elements from the back or by appending clones of `value`
@@ -2675,7 +2675,7 @@ fn wrap_index(logical_index: usize, capacity: usize) -> usize {
2675
2675
impl < T : PartialEq , A : Allocator , const COOP_PREFERRED : bool > PartialEq
2676
2676
for VecDeque < T , A , COOP_PREFERRED >
2677
2677
where
2678
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2678
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2679
2679
{
2680
2680
fn eq ( & self , other : & Self ) -> bool {
2681
2681
if self . len != other. len ( ) {
@@ -2716,7 +2716,7 @@ where
2716
2716
2717
2717
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2718
2718
impl < T : Eq , A : Allocator , const COOP_PREFERRED : bool > Eq for VecDeque < T , A , COOP_PREFERRED > where
2719
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] :
2719
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] :
2720
2720
{
2721
2721
}
2722
2722
@@ -2731,7 +2731,7 @@ __impl_slice_eq1! { [const N: usize] VecDeque<T, A, COOP_PREFERRED>, &mut [U; N]
2731
2731
impl < T : PartialOrd , A : Allocator , const COOP_PREFERRED : bool > PartialOrd
2732
2732
for VecDeque < T , A , COOP_PREFERRED >
2733
2733
where
2734
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2734
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2735
2735
{
2736
2736
fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
2737
2737
self . iter ( ) . partial_cmp ( other. iter ( ) )
@@ -2741,7 +2741,7 @@ where
2741
2741
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2742
2742
impl < T : Ord , A : Allocator , const COOP_PREFERRED : bool > Ord for VecDeque < T , A , COOP_PREFERRED >
2743
2743
where
2744
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2744
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2745
2745
{
2746
2746
#[ inline]
2747
2747
fn cmp ( & self , other : & Self ) -> Ordering {
@@ -2752,7 +2752,7 @@ where
2752
2752
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2753
2753
impl < T : Hash , A : Allocator , const COOP_PREFERRED : bool > Hash for VecDeque < T , A , COOP_PREFERRED >
2754
2754
where
2755
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2755
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2756
2756
{
2757
2757
fn hash < H : Hasher > ( & self , state : & mut H ) {
2758
2758
state. write_length_prefix ( self . len ) ;
@@ -2769,7 +2769,7 @@ where
2769
2769
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2770
2770
impl < T , A : Allocator , const COOP_PREFERRED : bool > Index < usize > for VecDeque < T , A , COOP_PREFERRED >
2771
2771
where
2772
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2772
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2773
2773
{
2774
2774
type Output = T ;
2775
2775
@@ -2782,7 +2782,7 @@ where
2782
2782
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2783
2783
impl < T , A : Allocator , const COOP_PREFERRED : bool > IndexMut < usize > for VecDeque < T , A , COOP_PREFERRED >
2784
2784
where
2785
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2785
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2786
2786
{
2787
2787
#[ inline]
2788
2788
fn index_mut ( & mut self , index : usize ) -> & mut T {
@@ -2793,7 +2793,7 @@ where
2793
2793
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2794
2794
impl < T , A : Allocator , const COOP_PREFERRED : bool > FromIterator < T > for VecDeque < T , A , COOP_PREFERRED >
2795
2795
where
2796
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2796
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2797
2797
{
2798
2798
fn from_iter < I : IntoIterator < Item = T > > ( iter : I ) -> VecDeque < T , Global , COOP_PREFERRED > {
2799
2799
SpecFromIter :: spec_from_iter ( iter. into_iter ( ) )
@@ -2803,7 +2803,7 @@ where
2803
2803
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2804
2804
impl < T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator for VecDeque < T , A , COOP_PREFERRED >
2805
2805
where
2806
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2806
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2807
2807
{
2808
2808
type Item = T ;
2809
2809
type IntoIter = IntoIter < T , A > ;
@@ -2819,7 +2819,7 @@ where
2819
2819
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
2820
2820
for & ' a VecDeque < T , A , COOP_PREFERRED >
2821
2821
where
2822
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2822
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2823
2823
{
2824
2824
type Item = & ' a T ;
2825
2825
type IntoIter = Iter < ' a , T > ;
@@ -2833,7 +2833,7 @@ where
2833
2833
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
2834
2834
for & ' a mut VecDeque < T , A , COOP_PREFERRED >
2835
2835
where
2836
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2836
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2837
2837
{
2838
2838
type Item = & ' a mut T ;
2839
2839
type IntoIter = IterMut < ' a , T > ;
@@ -2846,7 +2846,7 @@ where
2846
2846
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2847
2847
impl < T , A : Allocator , const COOP_PREFERRED : bool > Extend < T > for VecDeque < T , A , COOP_PREFERRED >
2848
2848
where
2849
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2849
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2850
2850
{
2851
2851
fn extend < I : IntoIterator < Item = T > > ( & mut self , iter : I ) {
2852
2852
<Self as SpecExtend < T , I :: IntoIter > >:: spec_extend ( self , iter. into_iter ( ) ) ;
@@ -2867,7 +2867,7 @@ where
2867
2867
impl < ' a , T : ' a + Copy , A : Allocator , const COOP_PREFERRED : bool > Extend < & ' a T >
2868
2868
for VecDeque < T , A , COOP_PREFERRED >
2869
2869
where
2870
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2870
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2871
2871
{
2872
2872
fn extend < I : IntoIterator < Item = & ' a T > > ( & mut self , iter : I ) {
2873
2873
self . spec_extend ( iter. into_iter ( ) ) ;
@@ -2888,7 +2888,7 @@ where
2888
2888
impl < T : fmt:: Debug , A : Allocator , const COOP_PREFERRED : bool > fmt:: Debug
2889
2889
for VecDeque < T , A , COOP_PREFERRED >
2890
2890
where
2891
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2891
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2892
2892
{
2893
2893
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
2894
2894
f. debug_list ( ) . entries ( self . iter ( ) ) . finish ( )
@@ -2899,7 +2899,7 @@ where
2899
2899
impl < T , A : Allocator , const COOP_PREFERRED : bool > From < Vec < T , A , COOP_PREFERRED > >
2900
2900
for VecDeque < T , A , COOP_PREFERRED >
2901
2901
where
2902
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2902
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2903
2903
{
2904
2904
/// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
2905
2905
///
@@ -2912,7 +2912,9 @@ where
2912
2912
#[ inline]
2913
2913
fn from < const OTHER_COOP_PREFERRED : bool > ( other : Vec < T , A , OTHER_COOP_PREFERRED > ) -> Self
2914
2914
where
2915
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( OTHER_COOP_PREFERRED ) ] : ,
2915
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > (
2916
+ OTHER_COOP_PREFERRED ,
2917
+ ) ] : ,
2916
2918
{
2917
2919
let ( ptr, len, cap, alloc) = other. into_raw_parts_with_alloc ( ) ;
2918
2920
Self { head : 0 , len, buf : unsafe { RawVec :: from_raw_parts_in ( ptr, cap, alloc) } }
@@ -2923,7 +2925,7 @@ where
2923
2925
impl < T , A : Allocator , const COOP_PREFERRED : bool > From < VecDeque < T , A , COOP_PREFERRED > >
2924
2926
for Vec < T , A , COOP_PREFERRED >
2925
2927
where
2926
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2928
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2927
2929
{
2928
2930
/// Turn a [`VecDeque<T>`] into a [`Vec<T>`].
2929
2931
///
@@ -2979,7 +2981,7 @@ where
2979
2981
impl < T , const N : usize , A : Allocator , const COOP_PREFERRED : bool > From < [ T ; N ] >
2980
2982
for VecDeque < T , A , COOP_PREFERRED >
2981
2983
where
2982
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2984
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2983
2985
{
2984
2986
/// Converts a `[T; N]` into a `VecDeque<T>`.
2985
2987
///
0 commit comments