diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-11-19 23:58:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-19 23:58:50 +0100 |
| commit | 5adc00fbb8a40ecc685b26abfce0a4b619eb4c88 (patch) | |
| tree | 7971001c1c4512ccaf2b2fbc01131135ac2d8ba4 | |
| parent | 95da42559316b4b399750eaffb4cc708ea22c430 (diff) | |
| parent | 53f969dfd1b5c128145c24653c668193e8c50f85 (diff) | |
| download | rust-5adc00fbb8a40ecc685b26abfce0a4b619eb4c88.tar.gz rust-5adc00fbb8a40ecc685b26abfce0a4b619eb4c88.zip | |
Rollup merge of #79217 - yoshuawuyts:copy_from_slice-alias, r=Mark-Simulacrum
Add the "memcpy" doc alias to slice::copy_from_slice [RFC1419](https://github.com/rust-lang/rfcs/pull/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. 
| -rw-r--r-- | library/core/src/slice/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 79ae1d5829a..c50aa18caf6 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -2724,6 +2724,7 @@ impl<T> [T] { /// /// [`clone_from_slice`]: #method.clone_from_slice /// [`split_at_mut`]: #method.split_at_mut + #[doc(alias = "memcpy")] #[stable(feature = "copy_from_slice", since = "1.9.0")] pub fn copy_from_slice(&mut self, src: &[T]) where |
