about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-05-31 07:57:37 +0200
committerGitHub <noreply@github.com>2022-05-31 07:57:37 +0200
commitefd2519e10e05ddeddc2bee7ed3819fcf6c69ef0 (patch)
tree45da1d36f63d9b2c823bdd25903ce3f020321e99
parent5885e6d45358139d74c8b2a52df01708fac6bbc8 (diff)
parentde3ac3c3f84672f6a7b930272e556609750d91b1 (diff)
downloadrust-efd2519e10e05ddeddc2bee7ed3819fcf6c69ef0.tar.gz
rust-efd2519e10e05ddeddc2bee7ed3819fcf6c69ef0.zip
Rollup merge of #97569 - thomcc:fill_with_isnt_memset, r=Amanieu
Remove `memset` alias from `fill_with`.

In https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Unsafe.20and.20Safe.20versions.20of.20APIs.20both.20getting.20the.20same.20alias/near/284413029 `@Amanieu` pointed out that we had this, which is not really right.

In our guidelines we say that we will "not add an alias for a function that's only somewhat similar or related", which applies here. Memset doesn't take a closure, not even conceptually.
-rw-r--r--library/core/src/slice/mod.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
index f5a90cb3d7a..77fd1ec2b8e 100644
--- a/library/core/src/slice/mod.rs
+++ b/library/core/src/slice/mod.rs
@@ -3083,7 +3083,6 @@ impl<T> [T] {
     /// buf.fill_with(Default::default);
     /// assert_eq!(buf, vec![0; 10]);
     /// ```
-    #[doc(alias = "memset")]
     #[stable(feature = "slice_fill_with", since = "1.51.0")]
     pub fn fill_with<F>(&mut self, mut f: F)
     where