Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 12 additions & 2 deletions src/libcollections/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,12 @@ impl<T> [T] {
}

/// Returns a reference to an element or subslice, without doing bounds
/// checking. So use it very carefully!
/// checking.
///
/// This is generally not recommended, use with caution! For a safe
/// alternative see [`get`].
///
/// [`get`]: #method.get
///
/// # Examples
///
Expand All @@ -413,7 +418,12 @@ impl<T> [T] {
}

/// Returns a mutable reference to an element or subslice, without doing
/// bounds checking. So use it very carefully!
/// bounds checking.
///
/// This is generally not recommended, use with caution! For a safe
/// alternative see [`get_mut`].
///
/// [`get_mut`]: #method.get_mut
///
/// # Examples
///
Expand Down
11 changes: 11 additions & 0 deletions src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,12 @@ impl str {
/// Creates a string slice from another string slice, bypassing safety
/// checks.
///
/// This is generally not recommended, use with caution! For a safe
/// alternative see [`str`] and [`Index`].
///
/// [`str`]: primitive.str.html
/// [`Index`]: ops/trait.Index.html
///
/// This new slice goes from `begin` to `end`, including `begin` but
/// excluding `end`.
///
Expand Down Expand Up @@ -477,6 +483,11 @@ impl str {

/// Creates a string slice from another string slice, bypassing safety
/// checks.
/// This is generally not recommended, use with caution! For a safe
/// alternative see [`str`] and [`IndexMut`].
///
/// [`str`]: primitive.str.html
/// [`IndexMut`]: ops/trait.IndexMut.html
///
/// This new slice goes from `begin` to `end`, including `begin` but
/// excluding `end`.
Expand Down