Skip to content

Commit 0795b2d

Browse files
committed
specify explicit safety guidance for from_utf8_unchecked
1 parent 496145b commit 0795b2d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/core/src/str/converts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str {
178178
/// Converts a slice of bytes to a string slice without checking
179179
/// that the string contains valid UTF-8; mutable version.
180180
///
181-
/// See the immutable version, [`from_utf8_unchecked()`] for more information.
181+
/// See the immutable version, [`from_utf8_unchecked()`] for documentation and safety requirements.
182182
///
183183
/// # Examples
184184
///

library/core/src/str/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl str {
306306
/// Converts a slice of bytes to a string slice without checking
307307
/// that the string contains valid UTF-8; mutable version.
308308
///
309-
/// See the immutable version, [`from_utf8_unchecked()`] for more information.
309+
/// See the immutable version, [`from_utf8_unchecked()`] for documentation and safety requirements.
310310
///
311311
/// # Examples
312312
///

0 commit comments

Comments
 (0)