diff options
| author | aticu <15schnic@gmail.com> | 2020-07-17 19:47:25 +0200 |
|---|---|---|
| committer | aticu <15schnic@gmail.com> | 2020-07-17 19:47:25 +0200 |
| commit | 4127ed1732f8fe55363df1b65b03b2e58d25fc7f (patch) | |
| tree | 1983647990602da6d113c1374160285b2b907cbb | |
| parent | 3014f23ddd437d2ba9947383c4565d09c1eb39f2 (diff) | |
| download | rust-4127ed1732f8fe55363df1b65b03b2e58d25fc7f.tar.gz rust-4127ed1732f8fe55363df1b65b03b2e58d25fc7f.zip | |
Fix `Safety` docs for `from_raw_parts_mut`
| -rw-r--r-- | src/libcore/slice/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 309a4ddb006..20b2c3d3c96 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -6095,7 +6095,7 @@ pub unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] { /// /// Behavior is undefined if any of the following conditions are violated: /// -/// * `data` must be [valid] for writes for `len * mem::size_of::<T>()` many bytes, +/// * `data` must be [valid] for boths reads and writes for `len * mem::size_of::<T>()` many bytes, /// and it must be properly aligned. This means in particular: /// /// * The entire memory range of this slice must be contained within a single allocated object! |
