From bd7d328807a8bb15732ebb764e1ea3df4fbe3fd1 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sun, 28 Apr 2024 09:28:27 -0400 Subject: [PATCH] Replace version placeholders for 1.79 --- compiler/rustc_feature/src/accepted.rs | 10 +++++----- compiler/rustc_feature/src/unstable.rs | 18 +++++++++--------- library/alloc/src/str.rs | 2 +- library/core/src/ffi/c_str.rs | 2 +- library/core/src/intrinsics.rs | 8 ++++---- library/core/src/iter/traits/collect.rs | 2 +- library/core/src/num/int_macros.rs | 12 ++++++------ library/core/src/num/mod.rs | 2 +- library/core/src/num/nonzero.rs | 6 +++--- library/core/src/num/uint_macros.rs | 12 ++++++------ library/core/src/panic/location.rs | 8 ++++---- library/core/src/ptr/const_ptr.rs | 10 +++++----- library/core/src/ptr/mut_ptr.rs | 10 +++++----- library/core/src/ptr/non_null.rs | 9 +++------ library/core/src/slice/mod.rs | 4 ++-- library/core/src/str/lossy.rs | 16 ++++++++-------- library/core/src/str/mod.rs | 2 +- library/core/src/sync/atomic.rs | 6 +++--- library/proc_macro/src/lib.rs | 4 ++-- library/std/src/io/cursor.rs | 6 +++--- library/std/src/io/error.rs | 2 +- library/std/src/io/util.rs | 6 +++--- library/std/src/num.rs | 2 +- library/std/src/path.rs | 2 +- 24 files changed, 79 insertions(+), 82 deletions(-) diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index de2bd60ffad..943cc632857 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -60,7 +60,7 @@ macro_rules! declare_features { /// Allows the definition of associated constants in `trait` or `impl` blocks. (accepted, associated_consts, "1.20.0", Some(29646)), /// Allows the user of associated type bounds. - (accepted, associated_type_bounds, "CURRENT_RUSTC_VERSION", Some(52662)), + (accepted, associated_type_bounds, "1.79.0", Some(52662)), /// Allows using associated `type`s in `trait`s. (accepted, associated_types, "1.0.0", None), /// Allows free and inherent `async fn`s, `async` blocks, and `.await` expressions. @@ -99,7 +99,7 @@ macro_rules! declare_features { /// Allows using the CMPXCHG16B target feature. (accepted, cmpxchg16b_target_feature, "1.69.0", Some(44839)), /// Allows use of the `#[collapse_debuginfo]` attribute. - (accepted, collapse_debuginfo, "CURRENT_RUSTC_VERSION", Some(100758)), + (accepted, collapse_debuginfo, "1.79.0", Some(100758)), /// Allows usage of the `compile_error!` macro. (accepted, compile_error, "1.20.0", Some(40872)), /// Allows `impl Trait` in function return types. @@ -208,13 +208,13 @@ macro_rules! declare_features { /// Allows referencing `Self` and projections in impl-trait. (accepted, impl_trait_projections, "1.74.0", Some(103532)), /// Allows using imported `main` function - (accepted, imported_main, "CURRENT_RUSTC_VERSION", Some(28937)), + (accepted, imported_main, "1.79.0", Some(28937)), /// Allows using `a..=b` and `..=b` as inclusive range syntaxes. (accepted, inclusive_range_syntax, "1.26.0", Some(28237)), /// Allows inferring outlives requirements (RFC 2093). (accepted, infer_outlives_requirements, "1.30.0", Some(44493)), /// Allow anonymous constants from an inline `const` block - (accepted, inline_const, "CURRENT_RUSTC_VERSION", Some(76001)), + (accepted, inline_const, "1.79.0", Some(76001)), /// Allows irrefutable patterns in `if let` and `while let` statements (RFC 2086). (accepted, irrefutable_let_patterns, "1.33.0", Some(44495)), /// Allows `#[instruction_set(_)]` attribute. @@ -360,7 +360,7 @@ macro_rules! declare_features { /// Allows macros to appear in the type position. (accepted, type_macros, "1.13.0", Some(27245)), /// Allows using type privacy lints (`private_interfaces`, `private_bounds`, `unnameable_types`). - (accepted, type_privacy_lints, "CURRENT_RUSTC_VERSION", Some(48054)), + (accepted, type_privacy_lints, "1.79.0", Some(48054)), /// Allows `const _: TYPE = VALUE`. (accepted, underscore_const_names, "1.37.0", Some(54912)), /// Allows `use path as _;` and `extern crate c as _;`. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index 132e2ddee29..e7d7a9f380b 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -216,7 +216,7 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Set the maximum pattern complexity allowed (not limited by default). (internal, pattern_complexity, "1.78.0", None), /// Allows using pattern types. - (internal, pattern_types, "CURRENT_RUSTC_VERSION", Some(123646)), + (internal, pattern_types, "1.79.0", Some(123646)), /// Allows using `#[prelude_import]` on glob `use` items. (internal, prelude_import, "1.2.0", None), /// Used to identify crates that contain the profiler runtime. @@ -384,7 +384,7 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Allows `cfg(target_thread_local)`. (unstable, cfg_target_thread_local, "1.7.0", Some(29594)), /// Allows the use of `#[cfg(ub_checks)` to check if UB checks are enabled. - (unstable, cfg_ub_checks, "CURRENT_RUSTC_VERSION", Some(123499)), + (unstable, cfg_ub_checks, "1.79.0", Some(123499)), /// Allow conditional compilation depending on rust version (unstable, cfg_version, "1.45.0", Some(64796)), /// Allows to use the `#[cfi_encoding = ""]` attribute. @@ -439,7 +439,7 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Allows having using `suggestion` in the `#[deprecated]` attribute. (unstable, deprecated_suggestion, "1.61.0", Some(94785)), /// Allows deref patterns. - (incomplete, deref_patterns, "CURRENT_RUSTC_VERSION", Some(87121)), + (incomplete, deref_patterns, "1.79.0", Some(87121)), /// Controls errors in trait implementations. (unstable, do_not_recommend, "1.67.0", Some(51992)), /// Tells rustdoc to automatically generate `#[doc(cfg(...))]`. @@ -530,9 +530,9 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Allows the `#[must_not_suspend]` attribute. (unstable, must_not_suspend, "1.57.0", Some(83310)), /// Make `mut` not reset the binding mode on edition >= 2024. - (incomplete, mut_preserve_binding_mode_2024, "CURRENT_RUSTC_VERSION", Some(123076)), + (incomplete, mut_preserve_binding_mode_2024, "1.79.0", Some(123076)), /// Allows `mut ref` and `mut ref mut` identifier patterns. - (incomplete, mut_ref, "CURRENT_RUSTC_VERSION", Some(123076)), + (incomplete, mut_ref, "1.79.0", Some(123076)), /// Allows using `#[naked]` on functions. (unstable, naked_functions, "1.9.0", Some(90957)), /// Allows specifying the as-needed link modifier @@ -564,17 +564,17 @@ pub fn internal(&self, feature: Symbol) -> bool { /// Allows using `#[optimize(X)]`. (unstable, optimize_attribute, "1.34.0", Some(54882)), /// Allows postfix match `expr.match { ... }` - (unstable, postfix_match, "CURRENT_RUSTC_VERSION", Some(121618)), + (unstable, postfix_match, "1.79.0", Some(121618)), /// Allows `use<'a, 'b, A, B>` in `impl use<...> Trait` for precise capture of generic args. - (incomplete, precise_capturing, "CURRENT_RUSTC_VERSION", Some(123432)), + (incomplete, precise_capturing, "1.79.0", Some(123432)), /// Allows macro attributes on expressions, statements and non-inline modules. (unstable, proc_macro_hygiene, "1.30.0", Some(54727)), /// Allows `&raw const $place_expr` and `&raw mut $place_expr` expressions. (unstable, raw_ref_op, "1.41.0", Some(64490)), /// Makes `&` and `&mut` patterns eat only one layer of references in Rust 2024. - (incomplete, ref_pat_eat_one_layer_2024, "CURRENT_RUSTC_VERSION", Some(123076)), + (incomplete, ref_pat_eat_one_layer_2024, "1.79.0", Some(123076)), /// Allows `&` and `&mut` patterns to consume match-ergonomics-inserted references. - (incomplete, ref_pat_everywhere, "CURRENT_RUSTC_VERSION", Some(123076)), + (incomplete, ref_pat_everywhere, "1.79.0", Some(123076)), /// Allows using the `#[register_tool]` attribute. (unstable, register_tool, "1.41.0", Some(66079)), /// Allows the `#[repr(i128)]` attribute for enums. diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs index d88639c4092..c0d292cd208 100644 --- a/library/alloc/src/str.rs +++ b/library/alloc/src/str.rs @@ -53,7 +53,7 @@ pub use core::str::{RSplitN, SplitN}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::str::{RSplitTerminator, SplitTerminator}; -#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "utf8_chunks", since = "1.79.0")] pub use core::str::{Utf8Chunk, Utf8Chunks}; /// Note: `str` in `Concat` is not meaningful here. diff --git a/library/core/src/ffi/c_str.rs b/library/core/src/ffi/c_str.rs index f4f33f8584b..aefb30463d3 100644 --- a/library/core/src/ffi/c_str.rs +++ b/library/core/src/ffi/c_str.rs @@ -528,7 +528,7 @@ const fn as_non_null_ptr(&self) -> NonNull { #[inline] #[must_use] #[doc(alias("len", "strlen"))] - #[stable(feature = "cstr_count_bytes", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "cstr_count_bytes", since = "1.79.0")] #[rustc_const_unstable(feature = "const_cstr_from_ptr", issue = "113219")] pub const fn count_bytes(&self) -> usize { self.inner.len() - 1 diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 14b4ce39ab4..dc41fb5a778 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -1128,7 +1128,7 @@ pub const fn unlikely(b: bool) -> bool { /// any safety invariants. /// /// Consider using [`core::panic::Location::caller`] instead. - #[rustc_const_stable(feature = "const_caller_location", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_caller_location", since = "1.79.0")] #[rustc_safe_intrinsic] #[rustc_nounwind] pub fn caller_location() -> &'static crate::panic::Location<'static>; @@ -2289,7 +2289,7 @@ pub const fn unlikely(b: bool) -> bool { /// /// The stable counterpart of this intrinsic is `unchecked_add` on the various /// integer types, such as [`u16::unchecked_add`] and [`i64::unchecked_add`]. - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[rustc_nounwind] pub fn unchecked_add(x: T, y: T) -> T; @@ -2298,7 +2298,7 @@ pub const fn unlikely(b: bool) -> bool { /// /// The stable counterpart of this intrinsic is `unchecked_sub` on the various /// integer types, such as [`u16::unchecked_sub`] and [`i64::unchecked_sub`]. - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[rustc_nounwind] pub fn unchecked_sub(x: T, y: T) -> T; @@ -2307,7 +2307,7 @@ pub const fn unlikely(b: bool) -> bool { /// /// The stable counterpart of this intrinsic is `unchecked_mul` on the various /// integer types, such as [`u16::unchecked_mul`] and [`i64::unchecked_mul`]. - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[rustc_nounwind] pub fn unchecked_mul(x: T, y: T) -> T; diff --git a/library/core/src/iter/traits/collect.rs b/library/core/src/iter/traits/collect.rs index 2ebbe2bf274..563781230c0 100644 --- a/library/core/src/iter/traits/collect.rs +++ b/library/core/src/iter/traits/collect.rs @@ -169,7 +169,7 @@ pub trait FromIterator: Sized { /// assert_eq!(lengths, [1, 1, 3, 1]); /// # Ok(()) } /// ``` -#[stable(feature = "from_iterator_for_tuple", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "from_iterator_for_tuple", since = "1.79.0")] impl FromIterator<(AE, BE)> for (A, B) where A: Default + Extend, diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index a92da88dd3f..f50419dad20 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -481,8 +481,8 @@ pub const fn strict_add(self, rhs: Self) -> Self { /// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked #[doc = concat!("[`checked_add`]: ", stringify!($SelfT), "::checked_add")] #[doc = concat!("[`wrapping_add`]: ", stringify!($SelfT), "::wrapping_add")] - #[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "unchecked_math", since = "1.79.0")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -623,8 +623,8 @@ pub const fn strict_sub(self, rhs: Self) -> Self { /// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked #[doc = concat!("[`checked_sub`]: ", stringify!($SelfT), "::checked_sub")] #[doc = concat!("[`wrapping_sub`]: ", stringify!($SelfT), "::wrapping_sub")] - #[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "unchecked_math", since = "1.79.0")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -765,8 +765,8 @@ pub const fn strict_mul(self, rhs: Self) -> Self { /// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked #[doc = concat!("[`checked_mul`]: ", stringify!($SelfT), "::checked_mul")] #[doc = concat!("[`wrapping_mul`]: ", stringify!($SelfT), "::wrapping_mul")] - #[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "unchecked_math", since = "1.79.0")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 443401c5dba..c02f73fdf03 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -67,7 +67,7 @@ macro_rules! unlikely { )] pub use nonzero::ZeroablePrimitive; -#[stable(feature = "generic_nonzero", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "generic_nonzero", since = "1.79.0")] pub use nonzero::NonZero; #[stable(feature = "signed_nonzero", since = "1.34.0")] diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 5a0958fdc89..fca36787659 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -109,7 +109,7 @@ unsafe impl const ZeroablePrimitive for $primitive { /// /// assert_eq!(size_of::>>(), size_of::()); /// ``` -#[stable(feature = "generic_nonzero", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "generic_nonzero", since = "1.79.0")] #[repr(transparent)] #[rustc_nonnull_optimization_guaranteed] #[rustc_diagnostic_item = "NonZero"] @@ -861,7 +861,7 @@ fn div(self, other: $Ty) -> $Int { } } - #[stable(feature = "nonzero_div_assign", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "nonzero_div_assign", since = "1.79.0")] impl DivAssign<$Ty> for $Int { /// This operation rounds towards zero, /// truncating any fractional part of the exact result, and cannot panic. @@ -884,7 +884,7 @@ fn rem(self, other: $Ty) -> $Int { } } - #[stable(feature = "nonzero_div_assign", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "nonzero_div_assign", since = "1.79.0")] impl RemAssign<$Ty> for $Int { /// This operation satisfies `n % d == n - (n / d) * d`, and cannot panic. #[inline] diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index ea14d769cc1..bb5113577c2 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -503,8 +503,8 @@ pub const fn strict_add(self, rhs: Self) -> Self { /// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked #[doc = concat!("[`checked_add`]: ", stringify!($SelfT), "::checked_add")] #[doc = concat!("[`wrapping_add`]: ", stringify!($SelfT), "::wrapping_add")] - #[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "unchecked_math", since = "1.79.0")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -660,8 +660,8 @@ pub const fn strict_sub(self, rhs: Self) -> Self { /// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked #[doc = concat!("[`checked_sub`]: ", stringify!($SelfT), "::checked_sub")] #[doc = concat!("[`wrapping_sub`]: ", stringify!($SelfT), "::wrapping_sub")] - #[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "unchecked_math", since = "1.79.0")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -746,8 +746,8 @@ pub const fn strict_mul(self, rhs: Self) -> Self { /// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked #[doc = concat!("[`checked_mul`]: ", stringify!($SelfT), "::checked_mul")] #[doc = concat!("[`wrapping_mul`]: ", stringify!($SelfT), "::wrapping_mul")] - #[stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "unchecked_math", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "unchecked_math", since = "1.79.0")] + #[rustc_const_stable(feature = "unchecked_math", since = "1.79.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] diff --git a/library/core/src/panic/location.rs b/library/core/src/panic/location.rs index 4ad507d8b86..eb27da1724e 100644 --- a/library/core/src/panic/location.rs +++ b/library/core/src/panic/location.rs @@ -81,7 +81,7 @@ impl<'a> Location<'a> { /// ``` #[must_use] #[stable(feature = "track_caller", since = "1.46.0")] - #[rustc_const_stable(feature = "const_caller_location", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_caller_location", since = "1.79.0")] #[track_caller] #[inline] pub const fn caller() -> &'static Location<'static> { @@ -123,7 +123,7 @@ pub const fn caller() -> &'static Location<'static> { /// ``` #[must_use] #[stable(feature = "panic_hooks", since = "1.10.0")] - #[rustc_const_stable(feature = "const_location_fields", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_location_fields", since = "1.79.0")] #[inline] pub const fn file(&self) -> &str { self.file @@ -148,7 +148,7 @@ pub const fn file(&self) -> &str { /// ``` #[must_use] #[stable(feature = "panic_hooks", since = "1.10.0")] - #[rustc_const_stable(feature = "const_location_fields", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_location_fields", since = "1.79.0")] #[inline] pub const fn line(&self) -> u32 { self.line @@ -173,7 +173,7 @@ pub const fn line(&self) -> u32 { /// ``` #[must_use] #[stable(feature = "panic_col", since = "1.25.0")] - #[rustc_const_stable(feature = "const_location_fields", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_location_fields", since = "1.79.0")] #[inline] pub const fn column(&self) -> u32 { self.col diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 9737fb8816e..e9eeb315330 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -1496,7 +1496,7 @@ pub const fn align_offset(self, align: usize) -> usize /// [tracking issue]: https://github.com/rust-lang/rust/issues/104203 #[must_use] #[inline] - #[stable(feature = "pointer_is_aligned", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "pointer_is_aligned", since = "1.79.0")] #[rustc_const_unstable(feature = "const_pointer_is_aligned", issue = "104203")] pub const fn is_aligned(self) -> bool where @@ -1653,8 +1653,8 @@ impl *const [T] { /// assert_eq!(slice.len(), 3); /// ``` #[inline] - #[stable(feature = "slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "const_slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "slice_ptr_len", since = "1.79.0")] + #[rustc_const_stable(feature = "const_slice_ptr_len", since = "1.79.0")] #[rustc_allow_const_fn_unstable(ptr_metadata)] pub const fn len(self) -> usize { metadata(self) @@ -1671,8 +1671,8 @@ pub const fn len(self) -> usize { /// assert!(!slice.is_empty()); /// ``` #[inline(always)] - #[stable(feature = "slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "const_slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "slice_ptr_len", since = "1.79.0")] + #[rustc_const_stable(feature = "const_slice_ptr_len", since = "1.79.0")] pub const fn is_empty(self) -> bool { self.len() == 0 } diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index d8f91f1996b..c5a188dc7d4 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -1756,7 +1756,7 @@ pub const fn align_offset(self, align: usize) -> usize /// [tracking issue]: https://github.com/rust-lang/rust/issues/104203 #[must_use] #[inline] - #[stable(feature = "pointer_is_aligned", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "pointer_is_aligned", since = "1.79.0")] #[rustc_const_unstable(feature = "const_pointer_is_aligned", issue = "104203")] pub const fn is_aligned(self) -> bool where @@ -1915,8 +1915,8 @@ impl *mut [T] { /// assert_eq!(slice.len(), 3); /// ``` #[inline(always)] - #[stable(feature = "slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "const_slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "slice_ptr_len", since = "1.79.0")] + #[rustc_const_stable(feature = "const_slice_ptr_len", since = "1.79.0")] #[rustc_allow_const_fn_unstable(ptr_metadata)] pub const fn len(self) -> usize { metadata(self) @@ -1933,8 +1933,8 @@ pub const fn len(self) -> usize { /// assert!(!slice.is_empty()); /// ``` #[inline(always)] - #[stable(feature = "slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "const_slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "slice_ptr_len", since = "1.79.0")] + #[rustc_const_stable(feature = "const_slice_ptr_len", since = "1.79.0")] pub const fn is_empty(self) -> bool { self.len() == 0 } diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 8697b22278f..617890cf083 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -1378,7 +1378,7 @@ pub const fn align_offset(self, align: usize) -> usize /// [tracking issue]: https://github.com/rust-lang/rust/issues/104203 #[inline] #[must_use] - #[stable(feature = "pointer_is_aligned", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "pointer_is_aligned", since = "1.79.0")] #[rustc_const_unstable(feature = "const_pointer_is_aligned", issue = "104203")] pub const fn is_aligned(self) -> bool where @@ -1564,11 +1564,8 @@ pub const fn len(self) -> usize { /// let slice: NonNull<[i8]> = NonNull::slice_from_raw_parts(NonNull::dangling(), 3); /// assert!(!slice.is_empty()); /// ``` - #[stable(feature = "slice_ptr_is_empty_nonnull", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable( - feature = "const_slice_ptr_is_empty_nonnull", - since = "CURRENT_RUSTC_VERSION" - )] + #[stable(feature = "slice_ptr_is_empty_nonnull", since = "1.79.0")] + #[rustc_const_stable(feature = "const_slice_ptr_is_empty_nonnull", since = "1.79.0")] #[must_use] #[inline] pub const fn is_empty(self) -> bool { diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 6e1ba74f72b..9c523fd6295 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -1964,7 +1964,7 @@ pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { /// assert_eq!(right, []); /// } /// ``` - #[stable(feature = "slice_split_at_unchecked", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "slice_split_at_unchecked", since = "1.79.0")] #[rustc_const_stable(feature = "const_slice_split_at_unchecked", since = "1.77.0")] #[inline] #[must_use] @@ -2017,7 +2017,7 @@ pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { /// } /// assert_eq!(v, [1, 2, 3, 4, 5, 6]); /// ``` - #[stable(feature = "slice_split_at_unchecked", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "slice_split_at_unchecked", since = "1.79.0")] #[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")] #[inline] #[must_use] diff --git a/library/core/src/str/lossy.rs b/library/core/src/str/lossy.rs index f8ecf1f3a7c..51a0777c2d6 100644 --- a/library/core/src/str/lossy.rs +++ b/library/core/src/str/lossy.rs @@ -40,7 +40,7 @@ impl [u8] { /// assert_eq!(lit, expected); /// } /// ``` - #[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "utf8_chunks", since = "1.79.0")] pub fn utf8_chunks(&self) -> Utf8Chunks<'_> { Utf8Chunks { source: self } } @@ -66,7 +66,7 @@ pub fn utf8_chunks(&self) -> Utf8Chunks<'_> { /// // The fourth character is broken /// assert_eq!(b"\xF1\x80", chunk.invalid()); /// ``` -#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "utf8_chunks", since = "1.79.0")] #[derive(Clone, Debug, PartialEq, Eq)] pub struct Utf8Chunk<'a> { valid: &'a str, @@ -79,7 +79,7 @@ impl<'a> Utf8Chunk<'a> { /// This substring can be empty at the start of the string or between /// broken UTF-8 characters. #[must_use] - #[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "utf8_chunks", since = "1.79.0")] pub fn valid(&self) -> &'a str { self.valid } @@ -99,7 +99,7 @@ pub fn valid(&self) -> &'a str { /// [`valid`]: Self::valid /// [`U+FFFD REPLACEMENT CHARACTER`]: crate::char::REPLACEMENT_CHARACTER #[must_use] - #[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "utf8_chunks", since = "1.79.0")] pub fn invalid(&self) -> &'a [u8] { self.invalid } @@ -172,7 +172,7 @@ fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { /// /// [`String::from_utf8_lossy`]: ../../std/string/struct.String.html#method.from_utf8_lossy #[must_use = "iterators are lazy and do nothing unless consumed"] -#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "utf8_chunks", since = "1.79.0")] #[derive(Clone)] pub struct Utf8Chunks<'a> { source: &'a [u8], @@ -186,7 +186,7 @@ pub fn debug(&self) -> Debug<'_> { } } -#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "utf8_chunks", since = "1.79.0")] impl<'a> Iterator for Utf8Chunks<'a> { type Item = Utf8Chunk<'a>; @@ -285,10 +285,10 @@ fn safe_get(xs: &[u8], i: usize) -> u8 { } } -#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "utf8_chunks", since = "1.79.0")] impl FusedIterator for Utf8Chunks<'_> {} -#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "utf8_chunks", since = "1.79.0")] impl fmt::Debug for Utf8Chunks<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_struct("Utf8Chunks").field("source", &self.debug()).finish() diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 3313da9dce7..adccbe02d46 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -24,7 +24,7 @@ pub mod pattern; mod lossy; -#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "utf8_chunks", since = "1.79.0")] pub use lossy::{Utf8Chunk, Utf8Chunks}; #[stable(feature = "rust1", since = "1.0.0")] diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 073459fcb00..249b8ccb437 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -579,7 +579,7 @@ pub fn from_mut_slice(v: &mut [bool]) -> &mut [Self] { /// ``` #[inline] #[stable(feature = "atomic_access", since = "1.15.0")] - #[rustc_const_stable(feature = "const_atomic_into_inner", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_atomic_into_inner", since = "1.79.0")] pub const fn into_inner(self) -> bool { self.v.primitive_into_inner() != 0 } @@ -1399,7 +1399,7 @@ pub fn from_mut_slice(v: &mut [*mut T]) -> &mut [Self] { /// ``` #[inline] #[stable(feature = "atomic_access", since = "1.15.0")] - #[rustc_const_stable(feature = "const_atomic_into_inner", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_atomic_into_inner", since = "1.79.0")] pub const fn into_inner(self) -> *mut T { self.p.primitive_into_inner() } @@ -2381,7 +2381,7 @@ pub fn from_mut_slice(v: &mut [$int_type]) -> &mut [Self] { /// ``` #[inline] #[$stable_access] - #[rustc_const_stable(feature = "const_atomic_into_inner", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_atomic_into_inner", since = "1.79.0")] pub const fn into_inner(self) -> $int_type { self.v.primitive_into_inner() } diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index 1ceff2e506c..23ae2e7dc0d 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -1360,7 +1360,7 @@ pub fn character(ch: char) -> Literal { } /// Byte character literal. - #[stable(feature = "proc_macro_byte_character", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "proc_macro_byte_character", since = "1.79.0")] pub fn byte_character(byte: u8) -> Literal { let string = [byte].escape_ascii().to_string(); Literal::new(bridge::LitKind::Byte, &string, None) @@ -1374,7 +1374,7 @@ pub fn byte_string(bytes: &[u8]) -> Literal { } /// C string literal. - #[stable(feature = "proc_macro_c_str_literals", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "proc_macro_c_str_literals", since = "1.79.0")] pub fn c_string(string: &CStr) -> Literal { let string = string.to_bytes().escape_ascii().to_string(); Literal::new(bridge::LitKind::CStr, &string, None) diff --git a/library/std/src/io/cursor.rs b/library/std/src/io/cursor.rs index 5b782fff7e5..f6680b211c7 100644 --- a/library/std/src/io/cursor.rs +++ b/library/std/src/io/cursor.rs @@ -95,7 +95,7 @@ impl Cursor { /// # force_inference(&buff); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_io_structs", since = "1.79.0")] pub const fn new(inner: T) -> Cursor { Cursor { pos: 0, inner } } @@ -132,7 +132,7 @@ pub fn into_inner(self) -> T { /// let reference = buff.get_ref(); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_io_structs", since = "1.79.0")] pub const fn get_ref(&self) -> &T { &self.inner } @@ -178,7 +178,7 @@ pub fn get_mut(&mut self) -> &mut T { /// assert_eq!(buff.position(), 1); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_io_structs", since = "1.79.0")] pub const fn position(&self) -> u64 { self.pos } diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs index 801621c6112..f366cb8f42b 100644 --- a/library/std/src/io/error.rs +++ b/library/std/src/io/error.rs @@ -921,7 +921,7 @@ pub fn into_inner(self) -> Option> { /// assert!(io_error.raw_os_error().is_none()); /// # } /// ``` - #[stable(feature = "io_error_downcast", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "io_error_downcast", since = "1.79.0")] pub fn downcast(self) -> result::Result where E: error::Error + Send + Sync + 'static, diff --git a/library/std/src/io/util.rs b/library/std/src/io/util.rs index 266a447f06b..b4c4dffc371 100644 --- a/library/std/src/io/util.rs +++ b/library/std/src/io/util.rs @@ -51,7 +51,7 @@ /// ``` #[must_use] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")] +#[rustc_const_stable(feature = "const_io_structs", since = "1.79.0")] pub const fn empty() -> Empty { Empty } @@ -173,7 +173,7 @@ pub struct Repeat { /// ``` #[must_use] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")] +#[rustc_const_stable(feature = "const_io_structs", since = "1.79.0")] pub const fn repeat(byte: u8) -> Repeat { Repeat { byte } } @@ -276,7 +276,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { /// ``` #[must_use] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")] +#[rustc_const_stable(feature = "const_io_structs", since = "1.79.0")] pub const fn sink() -> Sink { Sink } diff --git a/library/std/src/num.rs b/library/std/src/num.rs index fbe68f7e303..8910cdea7c0 100644 --- a/library/std/src/num.rs +++ b/library/std/src/num.rs @@ -23,7 +23,7 @@ )] pub use core::num::ZeroablePrimitive; -#[stable(feature = "generic_nonzero", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "generic_nonzero", since = "1.79.0")] pub use core::num::NonZero; #[stable(feature = "signed_nonzero", since = "1.34.0")] diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 85355435100..79d800ff072 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -3374,7 +3374,7 @@ fn description(&self) -> &str { /// /// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 /// [windows-path]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew -#[stable(feature = "absolute_path", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "absolute_path", since = "1.79.0")] pub fn absolute>(path: P) -> io::Result { let path = path.as_ref(); if path.as_os_str().is_empty() {