Skip to content

Commit d8d3761

Browse files
committed
Tweak wording of copy_nonoverlapping_memory to remove misleading 'allocated'.
It doesn't have to be a literal memory allocation (ala malloc), e.g. it can be in static memory, so saying "allocated" is mildly misleading.
1 parent a954663 commit d8d3761

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/libcore/intrinsics.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,12 @@ extern "rust-intrinsic" {
262262
///
263263
/// # Safety
264264
///
265-
/// Beyond requiring that both regions of memory be allocated, it is Undefined Behaviour
266-
/// for source and destination to overlap. Care must also be taken with the ownership of
267-
/// `src` and `dst`. This method semantically moves the values of `src` into `dst`.
268-
/// However it does not drop the contents of `dst`, or prevent the contents of `src`
269-
/// from being dropped or used.
265+
/// Beyond requiring that the program must be allowed to access both regions
266+
/// of memory, it is Undefined Behaviour for source and destination to
267+
/// overlap. Care must also be taken with the ownership of `src` and
268+
/// `dst`. This method semantically moves the values of `src` into `dst`.
269+
/// However it does not drop the contents of `dst`, or prevent the contents
270+
/// of `src` from being dropped or used.
270271
///
271272
/// # Examples
272273
///

0 commit comments

Comments
 (0)