about summary refs log tree commit diff
path: root/library/alloc/src/str.rs
diff options
context:
space:
mode:
authorLemonJ <1632798336@qq.com>2025-02-27 15:18:10 +0800
committerLemonJ <1632798336@qq.com>2025-04-27 12:49:37 +0800
commitbfdd947bbd5a2d242d0cbd728b3cbf2a30206b74 (patch)
tree1adcffbdfed7f5cdea167b9613e8950625a4ed74 /library/alloc/src/str.rs
parent00f245915b0c7839d42c26f9628220c4f1b93bf6 (diff)
downloadrust-bfdd947bbd5a2d242d0cbd728b3cbf2a30206b74.tar.gz
rust-bfdd947bbd5a2d242d0cbd728b3cbf2a30206b74.zip
fix missing doc in CString::from_raw and str::from_boxed_utf8_unchecked
Diffstat (limited to 'library/alloc/src/str.rs')
-rw-r--r--library/alloc/src/str.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
index 6fee8d3fe33..a670bb5008a 100644
--- a/library/alloc/src/str.rs
+++ b/library/alloc/src/str.rs
@@ -604,6 +604,10 @@ impl str {
 /// Converts a boxed slice of bytes to a boxed string slice without checking
 /// that the string contains valid UTF-8.
 ///
+/// # Safety
+///
+/// * The provided bytes must contain a valid UTF-8 sequence.
+///
 /// # Examples
 ///
 /// ```