From f0827c67caf76dd3048962c8781cfab0e6f2a934 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sun, 12 Apr 2026 15:56:55 -0400 Subject: [PATCH] Apply replace-version-placeholder --- compiler/rustc_feature/src/unstable.rs | 16 +++---- library/core/src/cell/lazy.rs | 2 +- library/core/src/ffi/c_str.rs | 2 +- library/core/src/mem/alignment.rs | 2 +- library/core/src/ops/control_flow.rs | 8 ++-- library/core/src/panic/unwind_safe.rs | 2 +- library/core/src/ptr/mod.rs | 2 +- library/core/src/range.rs | 60 +++++++++++++------------- library/core/src/range/iter.rs | 20 ++++----- library/core/src/slice/index.rs | 12 +++--- library/core/src/str/traits.rs | 6 +-- library/std/src/lib.rs | 2 +- library/std/src/sync/lazy_lock.rs | 2 +- 13 files changed, 68 insertions(+), 68 deletions(-) diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index c56ddd35e2c0..19d0ce973133 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -234,7 +234,7 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Implementation details of externally implementable items (internal, eii_internals, "1.94.0", None), /// Implementation details of field representing types. - (internal, field_representing_type_raw, "CURRENT_RUSTC_VERSION", None), + (internal, field_representing_type_raw, "1.96.0", None), /// Outputs useful `assert!` messages (unstable, generic_assert, "1.63.0", None), /// Allows using the #[rustc_intrinsic] attribute. @@ -258,7 +258,7 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Allows using the `#[stable]` and `#[unstable]` attributes. (internal, staged_api, "1.0.0", None), /// Perma-unstable, only used to test the `incomplete_features` lint. - (incomplete, test_incomplete_feature, "CURRENT_RUSTC_VERSION", None), + (incomplete, test_incomplete_feature, "1.96.0", None), /// Added for testing unstable lints; perma-unstable. (internal, test_unstable_lint, "1.60.0", None), /// Use for stable + negative coherence and strict coherence depending on trait's @@ -475,9 +475,9 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Allows giving non-const impls custom diagnostic messages if attempted to be used as const (unstable, diagnostic_on_const, "1.93.0", Some(143874)), /// Allows giving on-move borrowck custom diagnostic messages for a type - (unstable, diagnostic_on_move, "CURRENT_RUSTC_VERSION", Some(154181)), + (unstable, diagnostic_on_move, "1.96.0", Some(154181)), /// Allows giving unresolved imports a custom diagnostic message - (unstable, diagnostic_on_unknown, "CURRENT_RUSTC_VERSION", Some(152900)), + (unstable, diagnostic_on_unknown, "1.96.0", Some(152900)), /// Allows `#[doc(cfg(...))]`. (unstable, doc_cfg, "1.21.0", Some(43781)), /// Allows `#[doc(masked)]`. @@ -509,7 +509,7 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Allows the use of `#[ffi_pure]` on foreign functions. (unstable, ffi_pure, "1.45.0", Some(58329)), /// Experimental field projections. - (incomplete, field_projections, "CURRENT_RUSTC_VERSION", Some(145383)), + (incomplete, field_projections, "1.96.0", Some(145383)), /// Allows marking trait functions as `final` to prevent overriding impls (unstable, final_associated_functions, "1.95.0", Some(131179)), /// Controlling the behavior of fmt::Debug @@ -543,7 +543,7 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Target features on hexagon. (unstable, hexagon_target_feature, "1.27.0", Some(150250)), /// Allows `impl(crate) trait Foo` restrictions. - (incomplete, impl_restriction, "CURRENT_RUSTC_VERSION", Some(105077)), + (incomplete, impl_restriction, "1.96.0", Some(105077)), /// Allows `impl Trait` to be used inside associated types (RFC 2515). (unstable, impl_trait_in_assoc_type, "1.70.0", Some(63063)), /// Allows `impl Trait` in bindings (`let`). @@ -576,7 +576,7 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Allow `macro_rules!` derive rules (unstable, macro_derive, "1.91.0", Some(143549)), /// Allow `$x:guard` matcher in macros - (unstable, macro_guard_matcher, "CURRENT_RUSTC_VERSION", Some(153104)), + (unstable, macro_guard_matcher, "1.96.0", Some(153104)), /// Give access to additional metadata about declarative macro meta-variables. (unstable, macro_metavar_expr, "1.61.0", Some(83527)), /// Provides a way to concatenate identifiers using metavariable expressions. @@ -587,7 +587,7 @@ pub fn internal(&self, feature: Symbol) -> bool { (incomplete, mgca_type_const_syntax, "1.95.0", Some(132980)), /// Allows additional const parameter types, such as [u8; 10] or user defined types. /// User defined types must not have fields more private than the type itself. - (unstable, min_adt_const_params, "CURRENT_RUSTC_VERSION", Some(154042)), + (unstable, min_adt_const_params, "1.96.0", Some(154042)), /// Enables the generic const args MVP (only bare paths, not arbitrary computation). (incomplete, min_generic_const_args, "1.84.0", Some(132980)), /// A minimal, sound subset of specialization intended to be used by the diff --git a/library/core/src/cell/lazy.rs b/library/core/src/cell/lazy.rs index 9d350166c681..66436ed7d94f 100644 --- a/library/core/src/cell/lazy.rs +++ b/library/core/src/cell/lazy.rs @@ -367,7 +367,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { } } -#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "from_wrapper_impls", since = "1.96.0")] impl From for LazyCell { /// Constructs a `LazyCell` that starts already initialized /// with the provided value. diff --git a/library/core/src/ffi/c_str.rs b/library/core/src/ffi/c_str.rs index 62b3d75d7a77..e3a3aed4a794 100644 --- a/library/core/src/ffi/c_str.rs +++ b/library/core/src/ffi/c_str.rs @@ -716,7 +716,7 @@ fn index(&self, index: ops::RangeFrom) -> &CStr { } } -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] impl ops::Index> for CStr { type Output = CStr; diff --git a/library/core/src/mem/alignment.rs b/library/core/src/mem/alignment.rs index a8c4c8ea78ff..82f693f0a9cc 100644 --- a/library/core/src/mem/alignment.rs +++ b/library/core/src/mem/alignment.rs @@ -178,7 +178,7 @@ pub const fn as_usize(self) -> usize { /// Returns the alignment as a [NonZero]<[usize]>. #[unstable(feature = "ptr_alignment_type", issue = "102070")] #[deprecated( - since = "CURRENT_RUSTC_VERSION", + since = "1.96.0", note = "renamed to `as_nonzero_usize`", suggestion = "as_nonzero_usize" )] diff --git a/library/core/src/ops/control_flow.rs b/library/core/src/ops/control_flow.rs index f532e8f116f0..5f8974133a94 100644 --- a/library/core/src/ops/control_flow.rs +++ b/library/core/src/ops/control_flow.rs @@ -262,8 +262,8 @@ pub const fn break_value(self) -> Option /// assert_eq!(res, Ok(&5)); /// ``` #[inline] - #[stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "control_flow_ok", since = "1.96.0")] + #[rustc_const_stable(feature = "control_flow_ok", since = "1.96.0")] #[rustc_allow_const_fn_unstable(const_precise_live_drops)] pub const fn break_ok(self) -> Result { match self { @@ -374,8 +374,8 @@ pub const fn continue_value(self) -> Option /// assert_eq!(res, Err("too big value detected")); /// ``` #[inline] - #[stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "control_flow_ok", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "control_flow_ok", since = "1.96.0")] + #[rustc_const_stable(feature = "control_flow_ok", since = "1.96.0")] #[rustc_allow_const_fn_unstable(const_precise_live_drops)] pub const fn continue_ok(self) -> Result { match self { diff --git a/library/core/src/panic/unwind_safe.rs b/library/core/src/panic/unwind_safe.rs index 20f85b5ca9cd..f7f485488e0f 100644 --- a/library/core/src/panic/unwind_safe.rs +++ b/library/core/src/panic/unwind_safe.rs @@ -317,7 +317,7 @@ fn size_hint(&self) -> (usize, Option) { /// If a value's type is already `UnwindSafe`, /// wrapping it in `AssertUnwindSafe` is never incorrect. -#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "from_wrapper_impls", since = "1.96.0")] impl From for AssertUnwindSafe where T: UnwindSafe, diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index ddeb1ccc72af..b8202e903285 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -413,7 +413,7 @@ use crate::{fmt, hash, intrinsics, ub_checks}; #[unstable(feature = "ptr_alignment_type", issue = "102070")] -#[deprecated(since = "CURRENT_RUSTC_VERSION", note = "moved from `ptr` to `mem`")] +#[deprecated(since = "1.96.0", note = "moved from `ptr` to `mem`")] /// Deprecated re-export of [mem::Alignment]. pub type Alignment = mem::Alignment; diff --git a/library/core/src/range.rs b/library/core/src/range.rs index 1200f8922c81..ade9a35b0ab3 100644 --- a/library/core/src/range.rs +++ b/library/core/src/range.rs @@ -24,13 +24,13 @@ pub mod legacy; #[doc(inline)] -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] pub use iter::RangeFromIter; #[doc(inline)] #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] pub use iter::RangeInclusiveIter; #[doc(inline)] -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] pub use iter::RangeIter; // FIXME(#125687): re-exports temporarily removed @@ -68,17 +68,17 @@ #[lang = "RangeCopy"] #[derive(Copy, Hash)] #[derive_const(Clone, Default, PartialEq, Eq)] -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] pub struct Range { /// The lower bound of the range (inclusive). - #[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_api", since = "1.96.0")] pub start: Idx, /// The upper bound of the range (exclusive). - #[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_api", since = "1.96.0")] pub end: Idx, } -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] impl fmt::Debug for Range { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { self.start.fmt(fmt)?; @@ -103,7 +103,7 @@ impl Range { /// assert_eq!(i.next(), Some(16)); /// assert_eq!(i.next(), Some(25)); /// ``` - #[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_api", since = "1.96.0")] #[inline] pub fn iter(&self) -> RangeIter { self.clone().into_iter() @@ -132,7 +132,7 @@ impl> Range { /// assert!(!Range::from(f32::NAN..1.0).contains(&0.5)); /// ``` #[inline] - #[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] pub const fn contains(&self, item: &U) -> bool where @@ -164,7 +164,7 @@ pub const fn contains(&self, item: &U) -> bool /// assert!( Range::from(f32::NAN..5.0).is_empty()); /// ``` #[inline] - #[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] pub const fn is_empty(&self) -> bool where @@ -174,7 +174,7 @@ pub const fn is_empty(&self) -> bool } } -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] impl const RangeBounds for Range { fn start_bound(&self) -> Bound<&T> { @@ -191,7 +191,7 @@ fn end_bound(&self) -> Bound<&T> { /// If you need to use this implementation where `T` is unsized, /// consider using the `RangeBounds` impl for a 2-tuple of [`Bound<&T>`][Bound], /// i.e. replace `start..end` with `(Bound::Included(start), Bound::Excluded(end))`. -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] impl const RangeBounds for Range<&T> { fn start_bound(&self) -> Bound<&T> { @@ -210,7 +210,7 @@ fn into_bounds(self) -> (Bound, Bound) { } } -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] impl const From> for legacy::Range { #[inline] @@ -218,7 +218,7 @@ fn from(value: Range) -> Self { Self { start: value.start, end: value.end } } } -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_convert", issue = "143773")] impl const From> for Range { #[inline] @@ -444,14 +444,14 @@ fn from(value: legacy::RangeInclusive) -> Self { #[lang = "RangeFromCopy"] #[derive(Copy, Hash)] #[derive_const(Clone, PartialEq, Eq)] -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] pub struct RangeFrom { /// The lower bound of the range (inclusive). - #[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_from_api", since = "1.96.0")] pub start: Idx, } -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] impl fmt::Debug for RangeFrom { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { self.start.fmt(fmt)?; @@ -475,7 +475,7 @@ impl RangeFrom { /// assert_eq!(i.next(), Some(16)); /// assert_eq!(i.next(), Some(25)); /// ``` - #[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_from_api", since = "1.96.0")] #[inline] pub fn iter(&self) -> RangeFromIter { self.clone().into_iter() @@ -499,7 +499,7 @@ impl> RangeFrom { /// assert!(!RangeFrom::from(f32::NAN..).contains(&0.5)); /// ``` #[inline] - #[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] pub const fn contains(&self, item: &U) -> bool where @@ -510,7 +510,7 @@ pub const fn contains(&self, item: &U) -> bool } } -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] impl const RangeBounds for RangeFrom { fn start_bound(&self) -> Bound<&T> { @@ -527,7 +527,7 @@ fn end_bound(&self) -> Bound<&T> { /// If you need to use this implementation where `T` is unsized, /// consider using the `RangeBounds` impl for a 2-tuple of [`Bound<&T>`][Bound], /// i.e. replace `start..` with `(Bound::Included(start), Bound::Unbounded)`. -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] impl const RangeBounds for RangeFrom<&T> { fn start_bound(&self) -> Bound<&T> { @@ -557,7 +557,7 @@ fn bound(self) -> (OneSidedRangeBound, T) { } } -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] impl const From> for legacy::RangeFrom { #[inline] @@ -565,7 +565,7 @@ fn from(value: RangeFrom) -> Self { Self { start: value.start } } } -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] impl const From> for RangeFrom { #[inline] @@ -619,14 +619,14 @@ fn from(value: legacy::RangeFrom) -> Self { #[lang = "RangeToInclusiveCopy"] #[doc(alias = "..=")] #[derive(Copy, Clone, PartialEq, Eq, Hash)] -#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] pub struct RangeToInclusive { /// The upper bound of the range (inclusive) - #[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] pub last: Idx, } -#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] impl fmt::Debug for RangeToInclusive { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!(fmt, "..=")?; @@ -650,7 +650,7 @@ impl> RangeToInclusive { /// assert!(!(..=f32::NAN).contains(&0.5)); /// ``` #[inline] - #[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] pub const fn contains(&self, item: &U) -> bool where @@ -661,13 +661,13 @@ pub const fn contains(&self, item: &U) -> bool } } -#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] impl From> for RangeToInclusive { fn from(value: legacy::RangeToInclusive) -> Self { Self { last: value.end } } } -#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] impl From> for legacy::RangeToInclusive { fn from(value: RangeToInclusive) -> Self { Self { end: value.last } @@ -677,7 +677,7 @@ fn from(value: RangeToInclusive) -> Self { // RangeToInclusive cannot impl From> // because underflow would be possible with (..0).into() -#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] impl const RangeBounds for RangeToInclusive { fn start_bound(&self) -> Bound<&T> { @@ -688,7 +688,7 @@ fn end_bound(&self) -> Bound<&T> { } } -#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_range", issue = "none")] impl const RangeBounds for RangeToInclusive<&T> { fn start_bound(&self) -> Bound<&T> { diff --git a/library/core/src/range/iter.rs b/library/core/src/range/iter.rs index a5db3699bc40..01b69554a0b1 100644 --- a/library/core/src/range/iter.rs +++ b/library/core/src/range/iter.rs @@ -6,7 +6,7 @@ use crate::{intrinsics, mem}; /// By-value [`Range`] iterator. -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] #[derive(Debug, Clone)] pub struct RangeIter(legacy::Range); @@ -64,7 +64,7 @@ unsafe impl TrustedRandomAccessNoCoerce for RangeIter<$t> { u64 i64 } -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] impl Iterator for RangeIter { type Item = A; @@ -132,7 +132,7 @@ unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item } } -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] impl DoubleEndedIterator for RangeIter { #[inline] fn next_back(&mut self) -> Option { @@ -153,10 +153,10 @@ fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero> { #[unstable(feature = "trusted_len", issue = "37572")] unsafe impl TrustedLen for RangeIter {} -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] impl FusedIterator for RangeIter {} -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] impl IntoIterator for Range { type Item = A; type IntoIter = RangeIter; @@ -299,7 +299,7 @@ fn into_iter(self) -> Self::IntoIter { // since e.g. `(0..=u64::MAX).len()` would be `u64::MAX + 1`. macro_rules! range_exact_iter_impl { ($($t:ty)*) => ($( - #[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_api", since = "1.96.0")] impl ExactSizeIterator for RangeIter<$t> { } )*) } @@ -322,7 +322,7 @@ impl ExactSizeIterator for RangeInclusiveIter<$t> { } } /// By-value [`RangeFrom`] iterator. -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] #[derive(Debug, Clone)] pub struct RangeFromIter { start: A, @@ -361,7 +361,7 @@ pub fn remainder(self) -> RangeFrom { } } -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] impl Iterator for RangeFromIter { type Item = A; @@ -432,10 +432,10 @@ fn nth(&mut self, n: usize) -> Option { #[unstable(feature = "trusted_len", issue = "37572")] unsafe impl TrustedLen for RangeFromIter {} -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] impl FusedIterator for RangeFromIter {} -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] impl IntoIterator for RangeFrom { type Item = A; type IntoIter = RangeFromIter; diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index f1727a1f629c..0efe87a2d536 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -125,13 +125,13 @@ impl Sealed for ops::RangeToInclusive {} #[stable(feature = "slice_index_with_ops_bound_pair", since = "1.53.0")] impl Sealed for (ops::Bound, ops::Bound) {} - #[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_api", since = "1.96.0")] impl Sealed for range::Range {} #[stable(feature = "new_range_inclusive_api", since = "1.95.0")] impl Sealed for range::RangeInclusive {} - #[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] impl Sealed for range::RangeToInclusive {} - #[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "new_range_from_api", since = "1.96.0")] impl Sealed for range::RangeFrom {} impl Sealed for ops::IndexRange {} @@ -458,7 +458,7 @@ fn index_mut(self, slice: &mut [T]) -> &mut [T] { } } -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] unsafe impl const SliceIndex<[T]> for range::Range { type Output = [T]; @@ -588,7 +588,7 @@ fn index_mut(self, slice: &mut [T]) -> &mut [T] { } } -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] unsafe impl const SliceIndex<[T]> for range::RangeFrom { type Output = [T]; @@ -801,7 +801,7 @@ fn index_mut(self, slice: &mut [T]) -> &mut [T] { } /// The methods `index` and `index_mut` panic if the end of the range is out of bounds. -#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] unsafe impl const SliceIndex<[T]> for range::RangeToInclusive { type Output = [T]; diff --git a/library/core/src/str/traits.rs b/library/core/src/str/traits.rs index da0039f055fd..3b5cec22b69e 100644 --- a/library/core/src/str/traits.rs +++ b/library/core/src/str/traits.rs @@ -258,7 +258,7 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output { } } -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] unsafe impl const SliceIndex for range::Range { type Output = str; @@ -555,7 +555,7 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output { } } -#[stable(feature = "new_range_from_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_from_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] unsafe impl const SliceIndex for range::RangeFrom { type Output = str; @@ -777,7 +777,7 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output { /// Panics if `last` does not point to the ending byte offset of a character /// (`last + 1` is either a starting byte offset as defined by /// `is_char_boundary`, or equal to `len`), or if `last >= len`. -#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_to_inclusive_api", since = "1.96.0")] #[rustc_const_unstable(feature = "const_index", issue = "143775")] unsafe impl const SliceIndex for range::RangeToInclusive { type Output = str; diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 6b5d21e1046f..2b347e5e8c28 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -545,7 +545,7 @@ pub use core::pin; #[stable(feature = "rust1", since = "1.0.0")] pub use core::ptr; -#[stable(feature = "new_range_api", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "new_range_api", since = "1.96.0")] pub use core::range; #[stable(feature = "rust1", since = "1.0.0")] pub use core::result; diff --git a/library/std/src/sync/lazy_lock.rs b/library/std/src/sync/lazy_lock.rs index de1b9c391e8f..2f2579e37aaf 100644 --- a/library/std/src/sync/lazy_lock.rs +++ b/library/std/src/sync/lazy_lock.rs @@ -396,7 +396,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { } } -#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "from_wrapper_impls", since = "1.96.0")] impl From for LazyLock { /// Constructs a `LazyLock` that starts already initialized /// with the provided value.