diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-31 09:04:38 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-31 09:04:38 +0530 |
| commit | 57938041c18ee1c1bef362e60f24f5b2d3a46213 (patch) | |
| tree | 08c6687505bdece30b94f7719ee0ef943b7b4ac5 /src/liballoc | |
| parent | 464c18ce9cc6a29c2dcf83d3e78576dbc5390f3c (diff) | |
| parent | acd48a2b3e7fcc0372f7718a2fac1cf80e03db95 (diff) | |
| download | rust-57938041c18ee1c1bef362e60f24f5b2d3a46213.tar.gz rust-57938041c18ee1c1bef362e60f24f5b2d3a46213.zip | |
Rollup merge of #23866 - alexcrichton:switch-some-orders, r=aturon
This functions swaps the order of arguments to a few functions that previously took (output, input) parameters, but now take (input, output) parameters (in that order). The affected functions are: * ptr::copy * ptr::copy_nonoverlapping * slice::bytes::copy_memory * intrinsics::copy * intrinsics::copy_nonoverlapping Closes #22890 [breaking-change]
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/heap.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index 3733350412e..c6c86e46b44 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -301,7 +301,7 @@ mod imp { libc::realloc(ptr as *mut libc::c_void, size as libc::size_t) as *mut u8 } else { let new_ptr = allocate(size, align); - ptr::copy(new_ptr, ptr, cmp::min(size, old_size)); + ptr::copy(ptr, new_ptr, cmp::min(size, old_size)); deallocate(ptr, old_size, align); new_ptr } |
