From 758aff7883b846a9ea01ee6c810f77a4a08c8a48 Mon Sep 17 00:00:00 2001 From: JessRudder Date: Fri, 12 Aug 2016 10:39:40 -0400 Subject: Update note to include recommendation to use `.as_slice()` --- src/libstd/primitive_docs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstd') 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")] -- cgit 1.4.1-3-g733a5