Skip to content

Commit efd2519

Browse files
authored
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.
2 parents 5885e6d + de3ac3c commit efd2519

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

library/core/src/slice/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3083,7 +3083,6 @@ impl<T> [T] {
30833083
/// buf.fill_with(Default::default);
30843084
/// assert_eq!(buf, vec![0; 10]);
30853085
/// ```
3086-
#[doc(alias = "memset")]
30873086
#[stable(feature = "slice_fill_with", since = "1.51.0")]
30883087
pub fn fill_with<F>(&mut self, mut f: F)
30893088
where

0 commit comments

Comments
 (0)