diff options
| author | bors <bors@rust-lang.org> | 2025-03-17 03:45:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-17 03:45:06 +0000 |
| commit | 10bcdad7df0de3cfb95c7bdb7b16908e73cafc09 (patch) | |
| tree | d2f9e4e9125115c89202924e3d714505560edb4e /library/core/src | |
| parent | c3dd4eefd64da263865f28d4c39d0ef09433d5bf (diff) | |
| parent | 514405505509e410865dc8648bc2df7a0ca59749 (diff) | |
Auto merge of #138583 - jhpratt:rollup-h699hty, r=jhpratt
Rollup of 5 pull requests Successful merges: - #136293 (document capacity for ZST as example) - #136359 (doc all differences of ptr:copy(_nonoverlapping) with memcpy and memmove) - #136816 (refactor `notable_traits_button` to use iterator combinators instead of for loop) - #138552 (Misc print request handling cleanups + a centralized test for print request stability gating) - #138573 (Make `_Unwind_Action` a type alias, not enum) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/intrinsics/mod.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs index 078f7552c87..cf03c07b6a5 100644 --- a/library/core/src/intrinsics/mod.rs +++ b/library/core/src/intrinsics/mod.rs @@ -3641,7 +3641,8 @@ pub const fn ptr_metadata<P: ptr::Pointee<Metadata = M> + ?Sized, M>(ptr: *const /// For regions of memory which might overlap, use [`copy`] instead. /// /// `copy_nonoverlapping` is semantically equivalent to C's [`memcpy`], but -/// with the argument order swapped. +/// with the source and destination arguments swapped, +/// and `count` counting the number of `T`s instead of bytes. /// /// The copy is "untyped" in the sense that data may be uninitialized or otherwise violate the /// requirements of `T`. The initialization state is preserved exactly. @@ -3761,8 +3762,10 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us /// If the source and destination will *never* overlap, /// [`copy_nonoverlapping`] can be used instead. /// -/// `copy` is semantically equivalent to C's [`memmove`], but with the argument -/// order swapped. Copying takes place as if the bytes were copied from `src` +/// `copy` is semantically equivalent to C's [`memmove`], but +/// with the source and destination arguments swapped, +/// and `count` counting the number of `T`s instead of bytes. +/// Copying takes place as if the bytes were copied from `src` /// to a temporary array and then copied from the array to `dst`. /// /// The copy is "untyped" in the sense that data may be uninitialized or otherwise violate the |
