Skip to content

Commit 3d0c420

Browse files
committed
stabilize [T]::array_windows
1 parent c8f22ca commit 3d0c420

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

library/alloc/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
#![feature(alloc_layout_extra)]
9090
#![feature(allocator_api)]
9191
#![feature(array_into_iter_constructors)]
92-
#![feature(array_windows)]
9392
#![feature(ascii_char)]
9493
#![feature(assert_matches)]
9594
#![feature(async_fn_traits)]

library/alloc/src/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use core::cmp::Ordering::{self, Less};
1818
use core::mem::MaybeUninit;
1919
#[cfg(not(no_global_oom_handling))]
2020
use core::ptr;
21-
#[unstable(feature = "array_windows", issue = "75027")]
21+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
2222
pub use core::slice::ArrayWindows;
2323
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]
2424
pub use core::slice::EscapeAscii;

library/core/src/slice/iter.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,20 +2200,23 @@ unsafe impl<T> Sync for ChunksExactMut<'_, T> where T: Sync {}
22002200
/// [`array_windows`]: slice::array_windows
22012201
/// [slices]: slice
22022202
#[derive(Debug, Clone, Copy)]
2203-
#[unstable(feature = "array_windows", issue = "75027")]
2203+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
22042204
#[must_use = "iterators are lazy and do nothing unless consumed"]
22052205
pub struct ArrayWindows<'a, T: 'a, const N: usize> {
22062206
v: &'a [T],
22072207
}
2208-
2208+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
2209+
unsafe impl<'a, T: Send, const N: usize> Send for ArrayWindows<'a, T, N> {}
2210+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
2211+
unsafe impl<'a, T: Sync, const N: usize> Sync for ArrayWindows<'a, T, N> {}
22092212
impl<'a, T: 'a, const N: usize> ArrayWindows<'a, T, N> {
22102213
#[inline]
22112214
pub(super) const fn new(slice: &'a [T]) -> Self {
22122215
Self { v: slice }
22132216
}
22142217
}
22152218

2216-
#[unstable(feature = "array_windows", issue = "75027")]
2219+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
22172220
impl<'a, T, const N: usize> Iterator for ArrayWindows<'a, T, N> {
22182221
type Item = &'a [T; N];
22192222

@@ -2250,7 +2253,7 @@ impl<'a, T, const N: usize> Iterator for ArrayWindows<'a, T, N> {
22502253
}
22512254
}
22522255

2253-
#[unstable(feature = "array_windows", issue = "75027")]
2256+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
22542257
impl<'a, T, const N: usize> DoubleEndedIterator for ArrayWindows<'a, T, N> {
22552258
#[inline]
22562259
fn next_back(&mut self) -> Option<&'a [T; N]> {
@@ -2269,7 +2272,7 @@ impl<'a, T, const N: usize> DoubleEndedIterator for ArrayWindows<'a, T, N> {
22692272
}
22702273
}
22712274

2272-
#[unstable(feature = "array_windows", issue = "75027")]
2275+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
22732276
impl<T, const N: usize> ExactSizeIterator for ArrayWindows<'_, T, N> {
22742277
fn is_empty(&self) -> bool {
22752278
self.v.len() < N

library/core/src/slice/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub use ascii::is_ascii_simple;
5151
pub use index::SliceIndex;
5252
#[unstable(feature = "slice_range", issue = "76393")]
5353
pub use index::{range, try_range};
54-
#[unstable(feature = "array_windows", issue = "75027")]
54+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
5555
pub use iter::ArrayWindows;
5656
#[stable(feature = "slice_group_by", since = "1.77.0")]
5757
pub use iter::{ChunkBy, ChunkByMut};
@@ -1626,7 +1626,6 @@ impl<T> [T] {
16261626
/// # Examples
16271627
///
16281628
/// ```
1629-
/// #![feature(array_windows)]
16301629
/// let slice = [0, 1, 2, 3];
16311630
/// let mut iter = slice.array_windows();
16321631
/// assert_eq!(iter.next().unwrap(), &[0, 1]);
@@ -1636,7 +1635,7 @@ impl<T> [T] {
16361635
/// ```
16371636
///
16381637
/// [`windows`]: slice::windows
1639-
#[unstable(feature = "array_windows", issue = "75027")]
1638+
#[stable(feature = "array_windows", since = "CURRENT_RUSTC_VERSION")]
16401639
#[rustc_const_unstable(feature = "const_slice_make_iter", issue = "137737")]
16411640
#[inline]
16421641
#[track_caller]

library/coretests/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(alloc_layout_extra)]
55
#![feature(array_ptr_get)]
66
#![feature(array_try_from_fn)]
7-
#![feature(array_windows)]
87
#![feature(ascii_char)]
98
#![feature(ascii_char_variants)]
109
#![feature(async_iter_from_iter)]

0 commit comments

Comments
 (0)