about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 798ab84069a..05398ca68c8 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -671,6 +671,7 @@ impl String {
     ///   same allocator the standard library uses, with a required alignment of exactly 1.
     /// * `length` needs to be less than or equal to `capacity`.
     /// * `capacity` needs to be the correct value.
+    /// * The first `length` bytes at `buf` need to be valid UTF-8.
     ///
     /// Violating these may cause problems like corrupting the allocator's
     /// internal data structures.