Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,18 @@ impl<T> Vec<T> {
}

/// Extracts a slice containing the entire vector.
///
/// Equivalent to `&s[..]`.
#[inline]
#[unstable(feature = "convert",
reason = "waiting on RFC revision")]
pub fn as_slice(&self) -> &[T] {
self
}

/// Deprecated: use `&mut s[..]` instead.
/// Extracts a mutable slice of the entire vector.
///
/// Equivalent to `&mut s[..]`.
#[inline]
#[unstable(feature = "convert",
reason = "waiting on RFC revision")]
Expand Down