Skip to content

Commit b560854

Browse files
committed
correct the descriptions
1 parent c75c4cd commit b560854

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

library/alloc/src/ffi/c_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ impl CString {
352352
/// # Safety
353353
///
354354
/// This should only ever be called with a pointer that was earlier
355-
/// obtained by calling [`CString::into_raw`] and this pointer must not be accessed
355+
/// obtained by calling [`CString::into_raw`] and the memory it points to must not be accessed
356356
/// through any other pointer during the lifetime of reconstructed `CString`.
357357
/// Other usage (e.g., trying to take ownership of a string that was allocated by foreign code)
358358
/// is likely to lead to undefined behavior or allocator corruption.

library/alloc/src/str.rs

-2
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,6 @@ impl str {
608608
///
609609
/// * The provided bytes must contain a valid UTF-8 sequence.
610610
///
611-
/// * The `Box<[u8]>` must have been allocated via the global allocator.
612-
///
613611
/// # Examples
614612
///
615613
/// ```

0 commit comments

Comments
 (0)