Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ impl<T: ?Sized> Box<T> {
/// ```
///
/// [memory layout]: self#memory-layout
#[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
#[unstable(feature = "box_vec_non_null", issue = "130364")]
#[inline]
#[must_use = "call `drop(Box::from_non_null(ptr))` if you intend to drop the `Box`"]
pub unsafe fn from_non_null(ptr: NonNull<T>) -> Self {
Expand Down Expand Up @@ -1431,7 +1431,7 @@ impl<T: ?Sized> Box<T> {
///
/// [memory layout]: self#memory-layout
#[must_use = "losing the pointer will leak memory"]
#[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
#[unstable(feature = "box_vec_non_null", issue = "130364")]
#[inline]
pub fn into_non_null(b: Self) -> NonNull<T> {
// SAFETY: `Box` is guaranteed to be non-null.
Expand Down Expand Up @@ -1540,7 +1540,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
///
/// [memory layout]: self#memory-layout
#[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
// #[unstable(feature = "box_vec_non_null", issue = "130364")]
#[inline]
pub unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Self {
// SAFETY: guaranteed by the caller.
Expand Down Expand Up @@ -1655,7 +1655,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// [memory layout]: self#memory-layout
#[must_use = "losing the pointer will leak memory"]
#[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
// #[unstable(feature = "box_vec_non_null", issue = "130364")]
#[inline]
pub fn into_non_null_with_allocator(b: Self) -> (NonNull<T>, A) {
let (ptr, alloc) = Box::into_raw_with_allocator(b);
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/collections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl const From<TryReserveErrorKind> for TryReserveError {
}
}

#[unstable(feature = "try_reserve_kind", reason = "new API", issue = "48043")]
#[unstable(feature = "try_reserve_kind", issue = "48043")]
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
#[cfg(not(test))]
impl const From<LayoutError> for TryReserveErrorKind {
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@ impl String {
/// assert_eq!("bna", s);
/// ```
#[cfg(not(no_global_oom_handling))]
#[unstable(feature = "string_remove_matches", reason = "new API", issue = "72826")]
#[unstable(feature = "string_remove_matches", issue = "72826")]
pub fn remove_matches<P: Pattern>(&mut self, pat: P) {
use core::str::pattern::Searcher;

Expand Down
14 changes: 7 additions & 7 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ impl<T> Vec<T> {
/// }
/// ```
#[inline]
#[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
#[unstable(feature = "box_vec_non_null", issue = "130364")]
pub unsafe fn from_parts(ptr: NonNull<T>, length: usize, capacity: usize) -> Self {
unsafe { Self::from_parts_in(ptr, length, capacity, Global) }
}
Expand Down Expand Up @@ -793,7 +793,7 @@ impl<T> Vec<T> {
/// ```
#[cfg(not(no_global_oom_handling))]
#[inline]
#[unstable(feature = "vec_from_fn", reason = "new API", issue = "149698")]
#[unstable(feature = "vec_from_fn", issue = "149698")]
pub fn from_fn<F>(length: usize, f: F) -> Self
where
F: FnMut(usize) -> T,
Expand Down Expand Up @@ -878,7 +878,7 @@ impl<T> Vec<T> {
/// assert_eq!(rebuilt, [4294967295, 0, 1]);
/// ```
#[must_use = "losing the pointer will leak memory"]
#[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
#[unstable(feature = "box_vec_non_null", issue = "130364")]
pub fn into_parts(self) -> (NonNull<T>, usize, usize) {
let (ptr, len, capacity) = self.into_raw_parts();
// SAFETY: A `Vec` always has a non-null pointer.
Expand Down Expand Up @@ -1291,7 +1291,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// }
/// ```
#[inline]
#[unstable(feature = "allocator_api", reason = "new API", issue = "32838")]
#[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "box_vec_non_null", issue = "130364")]
pub unsafe fn from_parts_in(ptr: NonNull<T>, length: usize, capacity: usize, alloc: A) -> Self {
ub_checks::assert_unsafe_precondition!(
Expand Down Expand Up @@ -1390,7 +1390,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// ```
#[must_use = "losing the pointer will leak memory"]
#[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
// #[unstable(feature = "box_vec_non_null", issue = "130364")]
pub fn into_parts_with_alloc(self) -> (NonNull<T>, usize, usize, A) {
let (ptr, len, capacity, alloc) = self.into_raw_parts_with_alloc();
// SAFETY: A `Vec` always has a non-null pointer.
Expand Down Expand Up @@ -1994,8 +1994,8 @@ impl<T, A: Allocator> Vec<T, A> {
/// [`as_mut_ptr`]: Vec::as_mut_ptr
/// [`as_ptr`]: Vec::as_ptr
/// [`as_non_null`]: Vec::as_non_null
#[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
#[rustc_const_unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
#[unstable(feature = "box_vec_non_null", issue = "130364")]
#[rustc_const_unstable(feature = "box_vec_non_null", issue = "130364")]
#[inline]
pub const fn as_non_null(&mut self) -> NonNull<T> {
self.buf.non_null()
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/iter/adapters/array_chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::ops::{ControlFlow, NeverShortCircuit, Try};
/// method on [`Iterator`]. See its documentation for more.
#[derive(Debug, Clone)]
#[must_use = "iterators are lazy and do nothing unless consumed"]
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[unstable(feature = "iter_array_chunks", issue = "100450")]
pub struct ArrayChunks<I: Iterator, const N: usize> {
iter: I,
remainder: Option<array::IntoIter<I::Item, N>>,
Expand Down Expand Up @@ -44,7 +44,7 @@ where
/// assert_eq!(rem.next(), Some(5));
/// assert_eq!(rem.next(), None);
/// ```
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[unstable(feature = "iter_array_chunks", issue = "100450")]
#[inline]
pub fn into_remainder(mut self) -> array::IntoIter<I::Item, N> {
if self.remainder.is_none() {
Expand All @@ -54,7 +54,7 @@ where
}
}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[unstable(feature = "iter_array_chunks", issue = "100450")]
impl<I, const N: usize> Iterator for ArrayChunks<I, N>
where
I: Iterator,
Expand Down Expand Up @@ -108,7 +108,7 @@ where
}
}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[unstable(feature = "iter_array_chunks", issue = "100450")]
impl<I, const N: usize> DoubleEndedIterator for ArrayChunks<I, N>
where
I: DoubleEndedIterator + ExactSizeIterator,
Expand Down Expand Up @@ -173,13 +173,13 @@ where
}
}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[unstable(feature = "iter_array_chunks", issue = "100450")]
impl<I, const N: usize> FusedIterator for ArrayChunks<I, N> where I: FusedIterator {}

#[unstable(issue = "none", feature = "trusted_fused")]
unsafe impl<I, const N: usize> TrustedFused for ArrayChunks<I, N> where I: TrustedFused + Iterator {}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[unstable(feature = "iter_array_chunks", issue = "100450")]
impl<I, const N: usize> ExactSizeIterator for ArrayChunks<I, N>
where
I: ExactSizeIterator,
Expand Down
16 changes: 8 additions & 8 deletions library/core/src/iter/adapters/intersperse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::iter::{Fuse, FusedIterator};
///
/// This `struct` is created by [`Iterator::intersperse`]. See its documentation
/// for more information.
#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
#[derive(Debug, Clone)]
pub struct Intersperse<I: Iterator>
where
Expand All @@ -17,7 +17,7 @@ where
iter: Fuse<I>,
}

#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
impl<I> FusedIterator for Intersperse<I>
where
I: FusedIterator,
Expand All @@ -34,7 +34,7 @@ where
}
}

#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
impl<I> Iterator for Intersperse<I>
where
I: Iterator,
Expand Down Expand Up @@ -87,7 +87,7 @@ where
///
/// This `struct` is created by [`Iterator::intersperse_with`]. See its
/// documentation for more information.
#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
pub struct IntersperseWith<I, G>
where
I: Iterator,
Expand All @@ -98,15 +98,15 @@ where
iter: Fuse<I>,
}

#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
impl<I, G> FusedIterator for IntersperseWith<I, G>
where
I: FusedIterator,
G: FnMut() -> I::Item,
{
}

#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
impl<I, G> fmt::Debug for IntersperseWith<I, G>
where
I: Iterator + fmt::Debug,
Expand All @@ -123,7 +123,7 @@ where
}
}

#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
impl<I, G> Clone for IntersperseWith<I, G>
where
I: Iterator + Clone,
Expand All @@ -150,7 +150,7 @@ where
}
}

#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
impl<I, G> Iterator for IntersperseWith<I, G>
where
I: Iterator,
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/iter/adapters/map_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{fmt, ptr};
/// This `struct` is created by the [`Iterator::map_windows`]. See its
/// documentation for more information.
#[must_use = "iterators are lazy and do nothing unless consumed"]
#[unstable(feature = "iter_map_windows", reason = "recently added", issue = "87155")]
#[unstable(feature = "iter_map_windows", issue = "87155")]
pub struct MapWindows<I: Iterator, F, const N: usize> {
f: F,
inner: MapWindowsInner<I, N>,
Expand Down Expand Up @@ -234,7 +234,7 @@ impl<T, const N: usize> Drop for Buffer<T, N> {
}
}

#[unstable(feature = "iter_map_windows", reason = "recently added", issue = "87155")]
#[unstable(feature = "iter_map_windows", issue = "87155")]
impl<I, F, R, const N: usize> Iterator for MapWindows<I, F, N>
where
I: Iterator,
Expand All @@ -255,30 +255,30 @@ where

// Note that even if the inner iterator not fused, the `MapWindows` is still fused,
// because we don't allow "holes" in the mapping window.
#[unstable(feature = "iter_map_windows", reason = "recently added", issue = "87155")]
#[unstable(feature = "iter_map_windows", issue = "87155")]
impl<I, F, R, const N: usize> FusedIterator for MapWindows<I, F, N>
where
I: Iterator,
F: FnMut(&[I::Item; N]) -> R,
{
}

#[unstable(feature = "iter_map_windows", reason = "recently added", issue = "87155")]
#[unstable(feature = "iter_map_windows", issue = "87155")]
impl<I, F, R, const N: usize> ExactSizeIterator for MapWindows<I, F, N>
where
I: ExactSizeIterator,
F: FnMut(&[I::Item; N]) -> R,
{
}

#[unstable(feature = "iter_map_windows", reason = "recently added", issue = "87155")]
#[unstable(feature = "iter_map_windows", issue = "87155")]
impl<I: Iterator + fmt::Debug, F, const N: usize> fmt::Debug for MapWindows<I, F, N> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("MapWindows").field("iter", &self.inner.iter).finish()
}
}

#[unstable(feature = "iter_map_windows", reason = "recently added", issue = "87155")]
#[unstable(feature = "iter_map_windows", issue = "87155")]
impl<I, F, const N: usize> Clone for MapWindows<I, F, N>
where
I: Iterator + Clone,
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/iter/adapters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mod take;
mod take_while;
mod zip;

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[unstable(feature = "iter_array_chunks", issue = "100450")]
pub use self::array_chunks::ArrayChunks;
#[unstable(feature = "std_internals", issue = "none")]
pub use self::by_ref_sized::ByRefSized;
Expand All @@ -40,11 +40,11 @@ pub use self::cloned::Cloned;
pub use self::copied::Copied;
#[stable(feature = "iterator_flatten", since = "1.29.0")]
pub use self::flatten::Flatten;
#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
pub use self::intersperse::{Intersperse, IntersperseWith};
#[stable(feature = "iter_map_while", since = "1.57.0")]
pub use self::map_while::MapWhile;
#[unstable(feature = "iter_map_windows", reason = "recently added", issue = "87155")]
#[unstable(feature = "iter_map_windows", issue = "87155")]
pub use self::map_windows::MapWindows;
#[stable(feature = "iterator_step_by", since = "1.28.0")]
pub use self::step_by::StepBy;
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ macro_rules! impl_fold_via_try_fold {
};
}

#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
#[unstable(feature = "iter_array_chunks", issue = "100450")]
pub use self::adapters::ArrayChunks;
#[unstable(feature = "std_internals", issue = "none")]
pub use self::adapters::ByRefSized;
Expand All @@ -394,7 +394,7 @@ pub use self::adapters::Copied;
pub use self::adapters::Flatten;
#[stable(feature = "iter_map_while", since = "1.57.0")]
pub use self::adapters::MapWhile;
#[unstable(feature = "iter_map_windows", reason = "recently added", issue = "87155")]
#[unstable(feature = "iter_map_windows", issue = "87155")]
pub use self::adapters::MapWindows;
#[unstable(feature = "inplace_iteration", issue = "none")]
pub use self::adapters::SourceIter;
Expand All @@ -414,7 +414,7 @@ pub use self::adapters::{
Chain, Cycle, Enumerate, Filter, FilterMap, FlatMap, Fuse, Inspect, Map, Peekable, Rev, Scan,
Skip, SkipWhile, Take, TakeWhile, Zip,
};
#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
#[unstable(feature = "iter_intersperse", issue = "79524")]
pub use self::adapters::{Intersperse, IntersperseWith};
#[unstable(
feature = "step_trait",
Expand Down
Loading
Loading