Skip to content

Commit e08daaf

Browse files
committed
Deprecate Vec::as_{mut_,}slice
Slicing syntax should be used instead. Fixes rust-lang#25622
1 parent efcc1d1 commit e08daaf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcollections/vec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,16 +441,16 @@ impl<T> Vec<T> {
441441

442442
/// Extracts a slice containing the entire vector.
443443
#[inline]
444-
#[unstable(feature = "convert",
445-
reason = "waiting on RFC revision")]
444+
#[deprecated(since = "1.2",
445+
reason = "Use slicing syntax instead: &v[..]")]
446446
pub fn as_slice(&self) -> &[T] {
447447
self
448448
}
449449

450450
/// Deprecated: use `&mut s[..]` instead.
451451
#[inline]
452-
#[unstable(feature = "convert",
453-
reason = "waiting on RFC revision")]
452+
#[deprecated(since = "1.2",
453+
reason = "Use slicing syntax instead: &mut v[..]")]
454454
pub fn as_mut_slice(&mut self) -> &mut [T] {
455455
&mut self[..]
456456
}

0 commit comments

Comments
 (0)