Skip to content

Commit 4127ed1

Browse files
committed
Fix Safety docs for from_raw_parts_mut
1 parent 3014f23 commit 4127ed1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6095,7 +6095,7 @@ pub unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
60956095
///
60966096
/// Behavior is undefined if any of the following conditions are violated:
60976097
///
6098-
/// * `data` must be [valid] for writes for `len * mem::size_of::<T>()` many bytes,
6098+
/// * `data` must be [valid] for boths reads and writes for `len * mem::size_of::<T>()` many bytes,
60996099
/// and it must be properly aligned. This means in particular:
61006100
///
61016101
/// * The entire memory range of this slice must be contained within a single allocated object!

0 commit comments

Comments
 (0)