File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -966,11 +966,8 @@ impl String {
966
966
/// This is highly unsafe, due to the number of invariants that aren't
967
967
/// checked:
968
968
///
969
- /// * The memory at `buf` needs to have been previously allocated by the
970
- /// same allocator the standard library uses, with a required alignment of exactly 1.
971
- /// * `length` needs to be less than or equal to `capacity`.
972
- /// * `capacity` needs to be the correct value.
973
- /// * The first `length` bytes at `buf` need to be valid UTF-8.
969
+ /// * all safety requirements for [`Vec::<u8>::from_raw_parts`]
970
+ /// * all safety requirements for [`String::from_utf8_unchecked`]
974
971
///
975
972
/// Violating these may cause problems like corrupting the allocator's
976
973
/// internal data structures. For example, it is normally **not** safe to
You can’t perform that action at this time.
0 commit comments