@@ -99,7 +99,7 @@ pub struct VecDeque<
99
99
#[ unstable( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global ,
100
100
const COOP_PREFERRED : bool = { DEFAULT_COOP_PREFERRED ! ( ) } ,
101
101
> where
102
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
102
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
103
103
{
104
104
// `self[0]`, if it exists, is `buf[head]`.
105
105
// `head < buf.capacity()`, unless `buf.capacity() == 0` when `head == 0`.
@@ -115,7 +115,7 @@ pub struct VecDeque<
115
115
impl < T : Clone , A : Allocator + Clone , const COOP_PREFERRED : bool > Clone
116
116
for VecDeque < T , A , COOP_PREFERRED >
117
117
where
118
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
118
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
119
119
{
120
120
fn clone ( & self ) -> Self {
121
121
let mut deq = Self :: with_capacity_in ( self . len ( ) , self . allocator ( ) . clone ( ) ) ;
@@ -133,7 +133,7 @@ where
133
133
unsafe impl < #[ may_dangle] T , A : Allocator , const COOP_PREFERRED : bool > Drop
134
134
for VecDeque < T , A , COOP_PREFERRED >
135
135
where
136
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
136
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
137
137
{
138
138
fn drop ( & mut self ) {
139
139
/// Runs the destructor for all items in the slice when it gets dropped (normally or
@@ -172,7 +172,7 @@ where
172
172
173
173
impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
174
174
where
175
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
175
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
176
176
{
177
177
/// Marginally more convenient
178
178
#[ inline]
@@ -464,15 +464,15 @@ where
464
464
) -> usize {
465
465
struct Guard < ' a , T , A : Allocator , const COOP_PREFERRED : bool >
466
466
where
467
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
467
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
468
468
{
469
469
deque : & ' a mut VecDeque < T , A , COOP_PREFERRED > ,
470
470
written : usize ,
471
471
}
472
472
473
473
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > Drop for Guard < ' a , T , A , COOP_PREFERRED >
474
474
where
475
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
475
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
476
476
{
477
477
fn drop ( & mut self ) {
478
478
self . deque . len += self . written ;
@@ -553,7 +553,7 @@ where
553
553
554
554
impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
555
555
where
556
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
556
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
557
557
{
558
558
/// Creates an empty deque.
559
559
///
@@ -592,7 +592,7 @@ where
592
592
593
593
impl < T , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
594
594
where
595
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
595
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
596
596
{
597
597
/// Creates an empty deque.
598
598
///
@@ -2630,7 +2630,7 @@ where
2630
2630
2631
2631
impl < T : Clone , A : Allocator , const COOP_PREFERRED : bool > VecDeque < T , A , COOP_PREFERRED >
2632
2632
where
2633
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2633
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2634
2634
{
2635
2635
/// Modifies the deque in-place so that `len()` is equal to new_len,
2636
2636
/// either by removing excess elements from the back or by appending clones of `value`
@@ -2679,7 +2679,7 @@ fn wrap_index(logical_index: usize, capacity: usize) -> usize {
2679
2679
impl < T : PartialEq , A : Allocator , const COOP_PREFERRED : bool > PartialEq
2680
2680
for VecDeque < T , A , COOP_PREFERRED >
2681
2681
where
2682
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2682
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2683
2683
{
2684
2684
fn eq ( & self , other : & Self ) -> bool {
2685
2685
if self . len != other. len ( ) {
@@ -2720,7 +2720,7 @@ where
2720
2720
2721
2721
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2722
2722
impl < T : Eq , A : Allocator , const COOP_PREFERRED : bool > Eq for VecDeque < T , A , COOP_PREFERRED > where
2723
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] :
2723
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] :
2724
2724
{
2725
2725
}
2726
2726
@@ -2735,7 +2735,7 @@ __impl_slice_eq1! { [const N: usize] VecDeque<T, A, COOP_PREFERRED>, &mut [U; N]
2735
2735
impl < T : PartialOrd , A : Allocator , const COOP_PREFERRED : bool > PartialOrd
2736
2736
for VecDeque < T , A , COOP_PREFERRED >
2737
2737
where
2738
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2738
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2739
2739
{
2740
2740
fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
2741
2741
self . iter ( ) . partial_cmp ( other. iter ( ) )
@@ -2745,7 +2745,7 @@ where
2745
2745
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2746
2746
impl < T : Ord , A : Allocator , const COOP_PREFERRED : bool > Ord for VecDeque < T , A , COOP_PREFERRED >
2747
2747
where
2748
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2748
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2749
2749
{
2750
2750
#[ inline]
2751
2751
fn cmp ( & self , other : & Self ) -> Ordering {
@@ -2756,7 +2756,7 @@ where
2756
2756
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2757
2757
impl < T : Hash , A : Allocator , const COOP_PREFERRED : bool > Hash for VecDeque < T , A , COOP_PREFERRED >
2758
2758
where
2759
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2759
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2760
2760
{
2761
2761
fn hash < H : Hasher > ( & self , state : & mut H ) {
2762
2762
state. write_length_prefix ( self . len ) ;
@@ -2773,7 +2773,7 @@ where
2773
2773
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2774
2774
impl < T , A : Allocator , const COOP_PREFERRED : bool > Index < usize > for VecDeque < T , A , COOP_PREFERRED >
2775
2775
where
2776
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2776
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2777
2777
{
2778
2778
type Output = T ;
2779
2779
@@ -2786,7 +2786,7 @@ where
2786
2786
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2787
2787
impl < T , A : Allocator , const COOP_PREFERRED : bool > IndexMut < usize > for VecDeque < T , A , COOP_PREFERRED >
2788
2788
where
2789
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2789
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2790
2790
{
2791
2791
#[ inline]
2792
2792
fn index_mut ( & mut self , index : usize ) -> & mut T {
@@ -2797,7 +2797,7 @@ where
2797
2797
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2798
2798
impl < T , A : Allocator , const COOP_PREFERRED : bool > FromIterator < T > for VecDeque < T , A , COOP_PREFERRED >
2799
2799
where
2800
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2800
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2801
2801
{
2802
2802
fn from_iter < I : IntoIterator < Item = T > > ( iter : I ) -> VecDeque < T , Global , COOP_PREFERRED > {
2803
2803
SpecFromIter :: spec_from_iter ( iter. into_iter ( ) )
@@ -2807,7 +2807,7 @@ where
2807
2807
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2808
2808
impl < T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator for VecDeque < T , A , COOP_PREFERRED >
2809
2809
where
2810
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2810
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2811
2811
{
2812
2812
type Item = T ;
2813
2813
type IntoIter = IntoIter < T , A > ;
@@ -2823,7 +2823,7 @@ where
2823
2823
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
2824
2824
for & ' a VecDeque < T , A , COOP_PREFERRED >
2825
2825
where
2826
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2826
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2827
2827
{
2828
2828
type Item = & ' a T ;
2829
2829
type IntoIter = Iter < ' a , T > ;
@@ -2837,7 +2837,7 @@ where
2837
2837
impl < ' a , T , A : Allocator , const COOP_PREFERRED : bool > IntoIterator
2838
2838
for & ' a mut VecDeque < T , A , COOP_PREFERRED >
2839
2839
where
2840
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2840
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2841
2841
{
2842
2842
type Item = & ' a mut T ;
2843
2843
type IntoIter = IterMut < ' a , T > ;
@@ -2850,7 +2850,7 @@ where
2850
2850
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2851
2851
impl < T , A : Allocator , const COOP_PREFERRED : bool > Extend < T > for VecDeque < T , A , COOP_PREFERRED >
2852
2852
where
2853
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2853
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2854
2854
{
2855
2855
fn extend < I : IntoIterator < Item = T > > ( & mut self , iter : I ) {
2856
2856
<Self as SpecExtend < T , I :: IntoIter > >:: spec_extend ( self , iter. into_iter ( ) ) ;
@@ -2871,7 +2871,7 @@ where
2871
2871
impl < ' a , T : ' a + Copy , A : Allocator , const COOP_PREFERRED : bool > Extend < & ' a T >
2872
2872
for VecDeque < T , A , COOP_PREFERRED >
2873
2873
where
2874
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2874
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2875
2875
{
2876
2876
fn extend < I : IntoIterator < Item = & ' a T > > ( & mut self , iter : I ) {
2877
2877
self . spec_extend ( iter. into_iter ( ) ) ;
@@ -2892,7 +2892,7 @@ where
2892
2892
impl < T : fmt:: Debug , A : Allocator , const COOP_PREFERRED : bool > fmt:: Debug
2893
2893
for VecDeque < T , A , COOP_PREFERRED >
2894
2894
where
2895
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2895
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2896
2896
{
2897
2897
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
2898
2898
f. debug_list ( ) . entries ( self . iter ( ) ) . finish ( )
@@ -2903,7 +2903,7 @@ where
2903
2903
impl < T , A : Allocator , const COOP_PREFERRED : bool > From < Vec < T , A , COOP_PREFERRED > >
2904
2904
for VecDeque < T , A , COOP_PREFERRED >
2905
2905
where
2906
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2906
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2907
2907
{
2908
2908
/// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
2909
2909
///
@@ -2916,7 +2916,7 @@ where
2916
2916
#[ inline]
2917
2917
fn from < const OTHER_COOP_PREFERRED : bool > ( other : Vec < T , A , OTHER_COOP_PREFERRED > ) -> Self
2918
2918
where
2919
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > (
2919
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > (
2920
2920
OTHER_COOP_PREFERRED ,
2921
2921
) ] : ,
2922
2922
{
@@ -2929,7 +2929,7 @@ where
2929
2929
impl < T , A : Allocator , const COOP_PREFERRED : bool > From < VecDeque < T , A , COOP_PREFERRED > >
2930
2930
for Vec < T , A , COOP_PREFERRED >
2931
2931
where
2932
- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference_specific :: < A > ( COOP_PREFERRED ) ] : ,
2932
+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2933
2933
{
2934
2934
/// Turn a [`VecDeque<T>`] into a [`Vec<T>`].
2935
2935
///
0 commit comments