diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index de891ea89189a..84618ba2593a8 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -385,6 +385,10 @@ mod prim_slice { } /// /// [`.as_ptr()`]: #method.as_ptr /// [`len()`]: #method.len +/// +/// Note: This example shows the internals of `&str`. `unsafe` should not be +/// used to get a string slice under normal circumstances. Use `.as_slice()` +/// instead. mod prim_str { } #[doc(primitive = "tuple")]