Skip to content

Commit

Permalink
Rollup merge of #79213 - yoshuawuyts:stabilize-slice-fill, r=m-ou-se
Browse files Browse the repository at this point in the history
Stabilize `core::slice::fill`

Tracking issue #70758

Stabilizes the `core::slice::fill` API in Rust 1.50, adding a `memset` doc alias so people coming from C/C++ looking for this operation can find it in the docs. This API hasn't seen any changes since we changed the signature in #71165, and it seems like the right time to propose stabilization. Thanks!

r? `@m-ou-se`
  • Loading branch information
Dylan-DPC authored Dec 25, 2020
2 parents 2c308b9 + c2281cc commit 21d36e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2581,14 +2581,12 @@ impl<T> [T] {
/// # Examples
///
/// ```
/// #![feature(slice_fill)]
///
/// let mut buf = vec![0; 10];
/// buf.fill(1);
/// assert_eq!(buf, vec![1; 10]);
/// ```
#[doc(alias = "memset")]
#[unstable(feature = "slice_fill", issue = "70758")]
#[stable(feature = "slice_fill", since = "1.50.0")]
pub fn fill(&mut self, value: T)
where
T: Clone,
Expand Down
1 change: 0 additions & 1 deletion library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@
#![feature(rustc_private)]
#![feature(shrink_to)]
#![feature(slice_concat_ext)]
#![feature(slice_fill)]
#![feature(slice_internals)]
#![feature(slice_ptr_get)]
#![feature(slice_ptr_len)]
Expand Down

0 comments on commit 21d36e0

Please sign in to comment.