about summary refs log tree commit diff
path: root/src/libstd/primitive_docs.rs
diff options
context:
space:
mode:
authorJessRudder <thejessicarudder@gmail.com>2016-08-12 10:39:40 -0400
committerJessRudder <thejessicarudder@gmail.com>2016-08-12 10:39:40 -0400
commit758aff7883b846a9ea01ee6c810f77a4a08c8a48 (patch)
treea851fc5ef316ca1ebf3d37787c05d5861ebed251 /src/libstd/primitive_docs.rs
parent91a2c25e2e8dc641decb04aba4e0338f199c8785 (diff)
downloadrust-758aff7883b846a9ea01ee6c810f77a4a08c8a48.tar.gz
rust-758aff7883b846a9ea01ee6c810f77a4a08c8a48.zip
Update note to include recommendation to use `.as_slice()`
Diffstat (limited to 'src/libstd/primitive_docs.rs')
-rw-r--r--src/libstd/primitive_docs.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs
index 6a470a52aa6..84618ba2593 100644
--- a/src/libstd/primitive_docs.rs
+++ b/src/libstd/primitive_docs.rs
@@ -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")]