Improve #Safety of core::ptr::replace
Added missing condition: `dst` must be readable
This commit is contained in:
parent
302b9e4b54
commit
351782d30a
1 changed files with 1 additions and 1 deletions
|
@ -471,7 +471,7 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
|
|||
///
|
||||
/// Behavior is undefined if any of the following conditions are violated:
|
||||
///
|
||||
/// * `dst` must be [valid] for writes.
|
||||
/// * `dst` must be [valid] for both reads and writes.
|
||||
///
|
||||
/// * `dst` must be properly aligned.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue