Skip to content

Commit 5adc00f

Browse files
authored
Rollup merge of #79217 - yoshuawuyts:copy_from_slice-alias, r=Mark-Simulacrum
Add the "memcpy" doc alias to slice::copy_from_slice [RFC1419](rust-lang/rfcs#1419) describes `slice::copy_from_slice` as a "safe memcpy". This enables people searching for `memcpy` to find the `slice::copy_from_slice` method. Thanks! ## Screenshots This is currently the output when searching for "memcpy" -- `copy_from_slice` is safe, and should be part of this list. ![Screenshot_2020-11-19 Results for memcpy - Rust](https://user-images.githubusercontent.com/2467194/99722964-c9e8fe80-2ab1-11eb-82a5-4afe703a0eea.png)
2 parents 95da425 + 53f969d commit 5adc00f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/slice/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2724,6 +2724,7 @@ impl<T> [T] {
27242724
///
27252725
/// [`clone_from_slice`]: #method.clone_from_slice
27262726
/// [`split_at_mut`]: #method.split_at_mut
2727+
#[doc(alias = "memcpy")]
27272728
#[stable(feature = "copy_from_slice", since = "1.9.0")]
27282729
pub fn copy_from_slice(&mut self, src: &[T])
27292730
where

0 commit comments

Comments
 (0)