Skip to content

Commit

Permalink
replace version placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Jun 11, 2024
1 parent c8170e6 commit a2ff49b
Show file tree
Hide file tree
Showing 21 changed files with 110 additions and 113 deletions.
24 changes: 12 additions & 12 deletions alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2123,23 +2123,23 @@ impl<I> FromIterator<I> for Box<[I]> {

/// This implementation is required to make sure that the `Box<[I]>: IntoIterator`
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
impl<I, A: Allocator> !Iterator for Box<[I], A> {}

/// This implementation is required to make sure that the `&Box<[I]>: IntoIterator`
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
impl<'a, I, A: Allocator> !Iterator for &'a Box<[I], A> {}

/// This implementation is required to make sure that the `&mut Box<[I]>: IntoIterator`
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
impl<'a, I, A: Allocator> !Iterator for &'a mut Box<[I], A> {}

// Note: the `#[rustc_skip_during_method_dispatch(boxed_slice)]` on `trait IntoIterator`
// hides this implementation from explicit `.into_iter()` calls on editions < 2024,
// so those calls will still resolve to the slice implementation, by reference.
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
impl<I, A: Allocator> IntoIterator for Box<[I], A> {
type IntoIter = vec::IntoIter<I, A>;
type Item = I;
Expand All @@ -2148,7 +2148,7 @@ impl<I, A: Allocator> IntoIterator for Box<[I], A> {
}
}

#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
impl<'a, I, A: Allocator> IntoIterator for &'a Box<[I], A> {
type IntoIter = slice::Iter<'a, I>;
type Item = &'a I;
Expand All @@ -2157,7 +2157,7 @@ impl<'a, I, A: Allocator> IntoIterator for &'a Box<[I], A> {
}
}

#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
impl<'a, I, A: Allocator> IntoIterator for &'a mut Box<[I], A> {
type IntoIter = slice::IterMut<'a, I>;
type Item = &'a mut I;
Expand All @@ -2167,47 +2167,47 @@ impl<'a, I, A: Allocator> IntoIterator for &'a mut Box<[I], A> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
impl FromIterator<char> for Box<str> {
fn from_iter<T: IntoIterator<Item = char>>(iter: T) -> Self {
String::from_iter(iter).into_boxed_str()
}
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
impl<'a> FromIterator<&'a char> for Box<str> {
fn from_iter<T: IntoIterator<Item = &'a char>>(iter: T) -> Self {
String::from_iter(iter).into_boxed_str()
}
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
impl<'a> FromIterator<&'a str> for Box<str> {
fn from_iter<T: IntoIterator<Item = &'a str>>(iter: T) -> Self {
String::from_iter(iter).into_boxed_str()
}
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
impl FromIterator<String> for Box<str> {
fn from_iter<T: IntoIterator<Item = String>>(iter: T) -> Self {
String::from_iter(iter).into_boxed_str()
}
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
impl<A: Allocator> FromIterator<Box<str, A>> for Box<str> {
fn from_iter<T: IntoIterator<Item = Box<str, A>>>(iter: T) -> Self {
String::from_iter(iter).into_boxed_str()
}
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
impl<'a> FromIterator<Cow<'a, str>> for Box<str> {
fn from_iter<T: IntoIterator<Item = Cow<'a, str>>>(iter: T) -> Self {
String::from_iter(iter).into_boxed_str()
Expand Down
7 changes: 2 additions & 5 deletions alloc/src/collections/binary_heap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,7 @@ impl<T: Ord> BinaryHeap<T> {
/// heap.push(4);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(
feature = "const_binary_heap_constructor",
since = "CURRENT_RUSTC_VERSION"
)]
#[rustc_const_stable(feature = "const_binary_heap_constructor", since = "1.80.0")]
#[must_use]
pub const fn new() -> BinaryHeap<T> {
BinaryHeap { data: vec![] }
Expand Down Expand Up @@ -1224,7 +1221,7 @@ impl<T, A: Allocator> BinaryHeap<T, A> {
/// io::sink().write(heap.as_slice()).unwrap();
/// ```
#[must_use]
#[stable(feature = "binary_heap_as_slice", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "binary_heap_as_slice", since = "1.80.0")]
pub fn as_slice(&self) -> &[T] {
self.data.as_slice()
}
Expand Down
2 changes: 1 addition & 1 deletion alloc/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ impl From<&CStr> for Rc<CStr> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
impl Default for Rc<CStr> {
/// Creates an empty CStr inside an Rc
///
Expand Down
4 changes: 2 additions & 2 deletions alloc/src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,7 @@ impl<T: Default> Default for Rc<T> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
impl Default for Rc<str> {
/// Creates an empty str inside an Rc
///
Expand All @@ -2262,7 +2262,7 @@ impl Default for Rc<str> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
impl<T> Default for Rc<[T]> {
/// Creates an empty `[T]` inside an Rc
///
Expand Down
6 changes: 3 additions & 3 deletions alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3405,7 +3405,7 @@ static STATIC_INNER_SLICE: SliceArcInnerForStatic = SliceArcInnerForStatic {
};

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
impl Default for Arc<str> {
/// Creates an empty str inside an Arc
///
Expand All @@ -3420,7 +3420,7 @@ impl Default for Arc<str> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
impl Default for Arc<core::ffi::CStr> {
/// Creates an empty CStr inside an Arc
///
Expand All @@ -3439,7 +3439,7 @@ impl Default for Arc<core::ffi::CStr> {
}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
impl<T> Default for Arc<[T]> {
/// Creates an empty `[T]` inside an Arc
///
Expand Down
2 changes: 1 addition & 1 deletion alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2649,7 +2649,7 @@ impl<T, A: Allocator, const N: usize> Vec<[T; N], A> {
/// let mut flattened = vec.into_flattened();
/// assert_eq!(flattened.pop(), Some(6));
/// ```
#[stable(feature = "slice_flatten", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "slice_flatten", since = "1.80.0")]
pub fn into_flattened(self) -> Vec<T, A> {
let (ptr, len, cap, alloc) = self.into_raw_parts_with_alloc();
let (new_len, new_cap) = if T::IS_ZST {
Expand Down
2 changes: 1 addition & 1 deletion core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ use crate::ptr::{self, NonNull};
mod lazy;
mod once;

#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "lazy_cell", since = "1.80.0")]
pub use lazy::LazyCell;
#[stable(feature = "once_cell", since = "1.70.0")]
pub use once::OnceCell;
Expand Down
14 changes: 7 additions & 7 deletions core/src/cell/lazy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum State<T, F> {
/// // 92
/// // 92
/// ```
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "lazy_cell", since = "1.80.0")]
pub struct LazyCell<T, F = fn() -> T> {
state: UnsafeCell<State<T, F>>,
}
Expand All @@ -54,8 +54,8 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
/// assert_eq!(&*lazy, "HELLO, WORLD!");
/// ```
#[inline]
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "lazy_cell", since = "1.80.0")]
#[rustc_const_stable(feature = "lazy_cell", since = "1.80.0")]
pub const fn new(f: F) -> LazyCell<T, F> {
LazyCell { state: UnsafeCell::new(State::Uninit(f)) }
}
Expand Down Expand Up @@ -103,7 +103,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
/// assert_eq!(&*lazy, &92);
/// ```
#[inline]
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "lazy_cell", since = "1.80.0")]
pub fn force(this: &LazyCell<T, F>) -> &T {
// SAFETY:
// This invalidates any mutable references to the data. The resulting
Expand Down Expand Up @@ -167,7 +167,7 @@ impl<T, F> LazyCell<T, F> {
}
}

#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "lazy_cell", since = "1.80.0")]
impl<T, F: FnOnce() -> T> Deref for LazyCell<T, F> {
type Target = T;
#[inline]
Expand All @@ -176,7 +176,7 @@ impl<T, F: FnOnce() -> T> Deref for LazyCell<T, F> {
}
}

#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "lazy_cell", since = "1.80.0")]
impl<T: Default> Default for LazyCell<T> {
/// Creates a new lazy value using `Default` as the initializing function.
#[inline]
Expand All @@ -185,7 +185,7 @@ impl<T: Default> Default for LazyCell<T> {
}
}

#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "lazy_cell", since = "1.80.0")]
impl<T: fmt::Debug, F> fmt::Debug for LazyCell<T, F> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut d = f.debug_tuple("LazyCell");
Expand Down
20 changes: 10 additions & 10 deletions core/src/net/ip_addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ impl Ipv4Addr {
///
/// assert_eq!(Ipv4Addr::BITS, 32);
/// ```
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bits", since = "1.80.0")]
pub const BITS: u32 = 32;

/// Converts an IPv4 address into a `u32` representation using native byte order.
Expand Down Expand Up @@ -492,8 +492,8 @@ impl Ipv4Addr {
/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x00), Ipv4Addr::from_bits(addr_bits));
///
/// ```
#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ip_bits", since = "1.80.0")]
#[stable(feature = "ip_bits", since = "1.80.0")]
#[must_use]
#[inline]
pub const fn to_bits(self) -> u32 {
Expand All @@ -512,8 +512,8 @@ impl Ipv4Addr {
/// let addr = Ipv4Addr::from(0x12345678);
/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x78), addr);
/// ```
#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ip_bits", since = "1.80.0")]
#[stable(feature = "ip_bits", since = "1.80.0")]
#[must_use]
#[inline]
pub const fn from_bits(bits: u32) -> Ipv4Addr {
Expand Down Expand Up @@ -1238,7 +1238,7 @@ impl Ipv6Addr {
///
/// assert_eq!(Ipv6Addr::BITS, 128);
/// ```
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bits", since = "1.80.0")]
pub const BITS: u32 = 128;

/// Converts an IPv6 address into a `u128` representation using native byte order.
Expand Down Expand Up @@ -1277,8 +1277,8 @@ impl Ipv6Addr {
/// Ipv6Addr::from_bits(addr_bits));
///
/// ```
#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ip_bits", since = "1.80.0")]
#[stable(feature = "ip_bits", since = "1.80.0")]
#[must_use]
#[inline]
pub const fn to_bits(self) -> u128 {
Expand All @@ -1302,8 +1302,8 @@ impl Ipv6Addr {
/// ),
/// addr);
/// ```
#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ip_bits", since = "1.80.0")]
#[stable(feature = "ip_bits", since = "1.80.0")]
#[must_use]
#[inline]
pub const fn from_bits(bits: u128) -> Ipv6Addr {
Expand Down
2 changes: 1 addition & 1 deletion core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ impl<T> Option<T> {
/// assert_eq!(prev, Some(43));
/// ```
#[inline]
#[stable(feature = "option_take_if", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "option_take_if", since = "1.80.0")]
pub fn take_if<P>(&mut self, predicate: P) -> Option<T>
where
P: FnOnce(&mut T) -> bool,
Expand Down
2 changes: 1 addition & 1 deletion core/src/prelude/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use crate::mem::drop;
#[stable(feature = "size_of_prelude", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "size_of_prelude", since = "1.80.0")]
#[doc(no_inline)]
pub use crate::mem::{align_of, align_of_val, size_of, size_of_val};

Expand Down
Loading

0 comments on commit a2ff49b

Please sign in to comment.