Skip to content

Commit

Permalink
Update note to include recommendation to use .as_slice()
Browse files Browse the repository at this point in the history
  • Loading branch information
JessRudder committed Aug 12, 2016
1 parent 91a2c25 commit 758aff7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libstd/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ mod prim_slice { }
/// [`len()`]: #method.len
///
/// Note: This example shows the internals of `&str`. `unsafe` should not be
/// used to get a string slice under normal circumstances.
/// used to get a string slice under normal circumstances. Use `.as_slice()`
/// instead.
mod prim_str { }

#[doc(primitive = "tuple")]
Expand Down

0 comments on commit 758aff7

Please sign in to comment.