@@ -163,10 +163,12 @@ pub trait ImmutableSlice<'a, T> {
163
163
/// Returns all but the first element of a vector
164
164
fn tail ( & self ) -> & ' a [ T ] ;
165
165
/// Returns all but the first `n' elements of a vector
166
+ #[ deprecated = "use slice_from"]
166
167
fn tailn ( & self , n : uint ) -> & ' a [ T ] ;
167
168
/// Returns all but the last element of a vector
168
169
fn init ( & self ) -> & ' a [ T ] ;
169
170
/// Returns all but the last `n' elements of a vector
171
+ #[ deprecated = "use slice_to but note the arguments are different" ]
170
172
fn initn ( & self , n : uint ) -> & ' a [ T ] ;
171
173
/// Returns the last element of a vector, or `None` if it is empty.
172
174
fn last ( & self ) -> Option < & ' a T > ;
@@ -339,6 +341,7 @@ impl<'a,T> ImmutableSlice<'a, T> for &'a [T] {
339
341
fn tail ( & self ) -> & ' a [ T ] { self . slice ( 1 , self . len ( ) ) }
340
342
341
343
#[ inline]
344
+ #[ deprecated = "use slice_from" ]
342
345
fn tailn ( & self , n : uint ) -> & ' a [ T ] { self . slice ( n, self . len ( ) ) }
343
346
344
347
#[ inline]
@@ -347,6 +350,7 @@ impl<'a,T> ImmutableSlice<'a, T> for &'a [T] {
347
350
}
348
351
349
352
#[ inline]
353
+ #[ deprecated = "use slice_to but note the arguments are different" ]
350
354
fn initn ( & self , n : uint ) -> & ' a [ T ] {
351
355
self . slice ( 0 , self . len ( ) - n)
352
356
}
0 commit comments