@@ -75,6 +75,7 @@ use SmallVecData::{Inline, Heap};
75
75
/// let mut small_vec = SmallVec8::new();
76
76
/// initialize(&mut small_vec);
77
77
/// ```
78
+ #[ deprecated( note = "Use `Extend` and `Deref<[T]>` instead" ) ]
78
79
pub trait VecLike < T > :
79
80
ops:: Index < usize , Output =T > +
80
81
ops:: IndexMut < usize > +
@@ -93,6 +94,7 @@ pub trait VecLike<T>:
93
94
fn push ( & mut self , value : T ) ;
94
95
}
95
96
97
+ #[ allow( deprecated) ]
96
98
impl < T > VecLike < T > for Vec < T > {
97
99
#[ inline]
98
100
fn push ( & mut self , value : T ) {
@@ -119,7 +121,7 @@ impl<T> VecLike<T> for Vec<T> {
119
121
/// initialize(&mut small_vec);
120
122
/// assert_eq!(&small_vec as &[_], b"Test!");
121
123
/// ```
122
- pub trait ExtendFromSlice < T > : VecLike < T > {
124
+ pub trait ExtendFromSlice < T > {
123
125
/// Extends a collection from a slice of its element type
124
126
fn extend_from_slice ( & mut self , other : & [ T ] ) ;
125
127
}
@@ -853,6 +855,7 @@ impl<A: Array> ExtendFromSlice<A::Item> for SmallVec<A> where A::Item: Copy {
853
855
}
854
856
}
855
857
858
+ #[ allow( deprecated) ]
856
859
impl < A : Array > VecLike < A :: Item > for SmallVec < A > {
857
860
#[ inline]
858
861
fn push ( & mut self , value : A :: Item ) {
@@ -1582,6 +1585,7 @@ pub mod tests {
1582
1585
}
1583
1586
1584
1587
#[ test]
1588
+ #[ allow( deprecated) ]
1585
1589
fn veclike_deref_slice ( ) {
1586
1590
use super :: VecLike ;
1587
1591
0 commit comments