Replace version placeholders with 1.95.0

(cherry picked from commit bad24ccbec)
This commit is contained in:
Josh Stone
2026-03-02 15:00:53 -08:00
parent 085c58f2c0
commit 78157ddde9
26 changed files with 87 additions and 87 deletions
+2 -2
View File
@@ -103,7 +103,7 @@ macro_rules! declare_features {
/// Enables `#[cfg(panic = "...")]` config key.
(accepted, cfg_panic, "1.60.0", Some(77443)),
/// Provides a native way to easily manage multiple conditional flags without having to rewrite each clause multiple times.
(accepted, cfg_select, "CURRENT_RUSTC_VERSION", Some(115585)),
(accepted, cfg_select, "1.95.0", Some(115585)),
/// Allows `cfg(target_abi = "...")`.
(accepted, cfg_target_abi, "1.78.0", Some(80970)),
/// Allows `cfg(target_feature = "...")`.
@@ -243,7 +243,7 @@ macro_rules! declare_features {
/// Allows the use of `if let` expressions.
(accepted, if_let, "1.0.0", None),
/// Allows `if let` guard in match arms.
(accepted, if_let_guard, "CURRENT_RUSTC_VERSION", Some(51114)),
(accepted, if_let_guard, "1.95.0", Some(51114)),
/// Rescoping temporaries in `if let` to align with Rust 2024.
(accepted, if_let_rescope, "1.84.0", Some(124085)),
/// Allows top level or-patterns (`p | q`) in `if let` and `while let`.
+2 -2
View File
@@ -103,7 +103,7 @@ macro_rules! declare_features {
(removed, default_type_parameter_fallback, "1.82.0", Some(27336),
Some("never properly implemented; requires significant design work"), 127655),
/// Allows using `#[deprecated_safe]` to deprecate the safeness of a function or trait
(removed, deprecated_safe, "CURRENT_RUSTC_VERSION", Some(94978), Some("never properly implemented, in the way of attribute refactor"), 152554),
(removed, deprecated_safe, "1.95.0", Some(94978), Some("never properly implemented, in the way of attribute refactor"), 152554),
/// Allows deriving traits as per `SmartPointer` specification
(removed, derive_smart_pointer, "1.84.0", Some(123430), Some("replaced by `CoercePointee`"), 131284),
/// Tells rustdoc to automatically generate `#[doc(cfg(...))]`.
@@ -174,7 +174,7 @@ macro_rules! declare_features {
Some("removed due to implementation concerns as it requires significant refactorings"), 138492),
/// A temporary feature gate used to enable parser extensions needed
/// to bootstrap fix for #5723.
(removed, issue_5723_bootstrap, "CURRENT_RUSTC_VERSION", None, None),
(removed, issue_5723_bootstrap, "1.95.0", None, None),
/// Lazily evaluate constants. This allows constants to depend on type parameters.
(removed, lazy_normalization_consts, "1.56.0", Some(72219), Some("superseded by `generic_const_exprs`"), 88369),
/// Changes `impl Trait` to capture all lifetimes in scope.
+7 -7
View File
@@ -382,7 +382,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
/// Allows `async` trait bound modifier.
(unstable, async_trait_bounds, "1.85.0", Some(62290)),
/// Target features on avr.
(unstable, avr_target_feature, "CURRENT_RUSTC_VERSION", Some(146889)),
(unstable, avr_target_feature, "1.95.0", Some(146889)),
/// Allows using Intel AVX10 target features and intrinsics
(unstable, avx10_target_feature, "1.88.0", Some(138843)),
/// Target features on bpf.
@@ -425,9 +425,9 @@ pub fn internal(&self, feature: Symbol) -> bool {
/// Allows `async {}` expressions in const contexts.
(unstable, const_async_blocks, "1.53.0", Some(85368)),
/// Allows `const { ... }` as a shorthand for `const _: () = const { ... };` for module items.
(unstable, const_block_items, "CURRENT_RUSTC_VERSION", Some(149226)),
(unstable, const_block_items, "1.95.0", Some(149226)),
/// Allows defining and calling c-variadic functions in const contexts.
(unstable, const_c_variadic, "CURRENT_RUSTC_VERSION", Some(151787)),
(unstable, const_c_variadic, "1.95.0", Some(151787)),
/// Allows `const || {}` closures in const contexts.
(incomplete, const_closures, "1.68.0", Some(106003)),
/// Allows using `[const] Destruct` bounds and calling drop impls in const contexts.
@@ -503,7 +503,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
/// Experimental field projections.
(incomplete, field_projections, "CURRENT_RUSTC_VERSION", Some(145383)),
/// Allows marking trait functions as `final` to prevent overriding impls
(unstable, final_associated_functions, "CURRENT_RUSTC_VERSION", Some(131179)),
(unstable, final_associated_functions, "1.95.0", Some(131179)),
/// Controlling the behavior of fmt::Debug
(unstable, fmt_debug, "1.82.0", Some(129709)),
/// Allows using `#[align(...)]` on function items
@@ -572,7 +572,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
/// Allows `#[marker]` on certain traits allowing overlapping implementations.
(unstable, marker_trait_attr, "1.30.0", Some(29864)),
/// Enable mgca `type const` syntax before expansion.
(incomplete, mgca_type_const_syntax, "CURRENT_RUSTC_VERSION", Some(132980)),
(incomplete, mgca_type_const_syntax, "1.95.0", Some(132980)),
/// 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
@@ -618,7 +618,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
/// Allows using fields with slice type in offset_of!
(unstable, offset_of_slice, "1.81.0", Some(126151)),
/// Allows using generics in more complex const expressions, based on definitional equality.
(unstable, opaque_generic_const_args, "CURRENT_RUSTC_VERSION", Some(151972)),
(unstable, opaque_generic_const_args, "1.95.0", Some(151972)),
/// Allows using `#[optimize(X)]`.
(unstable, optimize_attribute, "1.34.0", Some(54882)),
/// Allows specifying nop padding on functions for dynamic patching.
@@ -653,7 +653,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
/// Allows `extern "rust-cold"`.
(unstable, rust_cold_cc, "1.63.0", Some(97544)),
/// Allows `extern "rust-preserve-none"`.
(unstable, rust_preserve_none_cc, "CURRENT_RUSTC_VERSION", Some(151401)),
(unstable, rust_preserve_none_cc, "1.95.0", Some(151401)),
/// Target features on s390x.
(unstable, s390x_target_feature, "1.82.0", Some(150259)),
/// Allows the use of the `sanitize` attribute.
+2 -2
View File
@@ -862,7 +862,7 @@ pub fn push_front(&mut self, elt: T) {
/// *ptr += 4;
/// assert_eq!(dl.front().unwrap(), &6);
/// ```
#[stable(feature = "push_mut", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "push_mut", since = "1.95.0")]
#[must_use = "if you don't need a reference to the value, use `LinkedList::push_front` instead"]
pub fn push_front_mut(&mut self, elt: T) -> &mut T {
let mut node =
@@ -933,7 +933,7 @@ pub fn push_back(&mut self, elt: T) {
/// *ptr += 4;
/// assert_eq!(dl.back().unwrap(), &6);
/// ```
#[stable(feature = "push_mut", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "push_mut", since = "1.95.0")]
#[must_use = "if you don't need a reference to the value, use `LinkedList::push_back` instead"]
pub fn push_back_mut(&mut self, elt: T) -> &mut T {
let mut node =
@@ -2175,7 +2175,7 @@ pub fn push_front(&mut self, value: T) {
/// *x -= 1;
/// assert_eq!(d.front(), Some(&7));
/// ```
#[stable(feature = "push_mut", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "push_mut", since = "1.95.0")]
#[must_use = "if you don't need a reference to the value, use `VecDeque::push_front` instead"]
pub fn push_front_mut(&mut self, value: T) -> &mut T {
if self.is_full() {
@@ -2218,7 +2218,7 @@ pub fn push_back(&mut self, value: T) {
/// *x += 1;
/// assert_eq!(d.back(), Some(&10));
/// ```
#[stable(feature = "push_mut", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "push_mut", since = "1.95.0")]
#[must_use = "if you don't need a reference to the value, use `VecDeque::push_back` instead"]
pub fn push_back_mut(&mut self, value: T) -> &mut T {
if self.is_full() {
@@ -2425,7 +2425,7 @@ pub fn insert(&mut self, index: usize, value: T) {
/// *x += 7;
/// assert_eq!(vec_deque, &[1, 12, 2, 3]);
/// ```
#[stable(feature = "push_mut", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "push_mut", since = "1.95.0")]
#[must_use = "if you don't need a reference to the value, use `VecDeque::insert` instead"]
pub fn insert_mut(&mut self, index: usize, value: T) -> &mut T {
assert!(index <= self.len(), "index out of bounds");
+2 -2
View File
@@ -1022,7 +1022,7 @@ pub fn push(&mut self, value: T) {
/// vector's elements to a larger allocation. This expensive operation is
/// offset by the *capacity* *O*(1) insertions it allows.
#[inline]
#[stable(feature = "push_mut", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "push_mut", since = "1.95.0")]
#[must_use = "if you don't need a reference to the value, use `Vec::push` instead"]
pub fn push_mut(&mut self, value: T) -> &mut T {
// Inform codegen that the length does not change across grow_one().
@@ -2290,7 +2290,7 @@ pub fn insert(&mut self, index: usize, element: T) {
/// the insertion index is 0.
#[cfg(not(no_global_oom_handling))]
#[inline]
#[stable(feature = "push_mut", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "push_mut", since = "1.95.0")]
#[track_caller]
#[must_use = "if you don't need a reference to the value, use `Vec::insert` instead"]
pub fn insert_mut(&mut self, index: usize, element: T) -> &mut T {
+8 -8
View File
@@ -263,8 +263,8 @@ pub const fn for_value<T: ?Sized>(t: &T) -> Self {
/// be that of a valid pointer, which means this must not be used
/// as a "not yet initialized" sentinel value.
/// Types that lazily allocate must track initialization by some other means.
#[stable(feature = "alloc_layout_extra", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "alloc_layout_extra", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "alloc_layout_extra", since = "1.95.0")]
#[rustc_const_stable(feature = "alloc_layout_extra", since = "1.95.0")]
#[must_use]
#[inline]
pub const fn dangling_ptr(&self) -> NonNull<u8> {
@@ -423,8 +423,8 @@ pub const fn pad_to_align(&self) -> Layout {
/// let repeated = padding_needed.repeat(0).unwrap();
/// assert_eq!(repeated, (Layout::from_size_align(0, 4).unwrap(), 8));
/// ```
#[stable(feature = "alloc_layout_extra", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "alloc_layout_extra", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "alloc_layout_extra", since = "1.95.0")]
#[rustc_const_stable(feature = "alloc_layout_extra", since = "1.95.0")]
#[inline]
pub const fn repeat(&self, n: usize) -> Result<(Self, usize), LayoutError> {
// FIXME(const-hack): the following could be way shorter with `?`
@@ -520,8 +520,8 @@ pub const fn extend(&self, next: Self) -> Result<(Self, usize), LayoutError> {
/// aligned.
///
/// On arithmetic overflow, returns `LayoutError`.
#[stable(feature = "alloc_layout_extra", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "alloc_layout_extra", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "alloc_layout_extra", since = "1.95.0")]
#[rustc_const_stable(feature = "alloc_layout_extra", since = "1.95.0")]
#[inline]
pub const fn repeat_packed(&self, n: usize) -> Result<Self, LayoutError> {
if let Some(size) = self.size.checked_mul(n) {
@@ -538,8 +538,8 @@ pub const fn repeat_packed(&self, n: usize) -> Result<Self, LayoutError> {
/// and is not incorporated *at all* into the resulting layout.
///
/// On arithmetic overflow, returns `LayoutError`.
#[stable(feature = "alloc_layout_extra", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "alloc_layout_extra", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "alloc_layout_extra", since = "1.95.0")]
#[rustc_const_stable(feature = "alloc_layout_extra", since = "1.95.0")]
#[inline]
pub const fn extend_packed(&self, next: Self) -> Result<Self, LayoutError> {
// SAFETY: each `size` is at most `isize::MAX == usize::MAX/2`, so the
+3 -3
View File
@@ -689,7 +689,7 @@ impl<T: CoerceUnsized<U>, U> CoerceUnsized<Cell<U>> for Cell<T> {}
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
impl<T: DispatchFromDyn<U>, U> DispatchFromDyn<Cell<U>> for Cell<T> {}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T, const N: usize> AsRef<[Cell<T>; N]> for Cell<[T; N]> {
#[inline]
fn as_ref(&self) -> &[Cell<T>; N] {
@@ -697,7 +697,7 @@ impl<T: DispatchFromDyn<U>, U> DispatchFromDyn<Cell<U>> for Cell<T> {}
}
}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T, const N: usize> AsRef<[Cell<T>]> for Cell<[T; N]> {
#[inline]
fn as_ref(&self) -> &[Cell<T>] {
@@ -705,7 +705,7 @@ fn as_ref(&self) -> &[Cell<T>] {
}
}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T> AsRef<[Cell<T>]> for Cell<[T]> {
#[inline]
fn as_ref(&self) -> &[Cell<T>] {
+1 -1
View File
@@ -1227,7 +1227,7 @@ fn is_pretty(&self) -> bool {
/// assert_eq!(format!("{:?}", wrapped), "'a'");
/// ```
#[stable(feature = "fmt_from_fn", since = "1.93.0")]
#[rustc_const_stable(feature = "const_fmt_from_fn", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_fmt_from_fn", since = "1.95.0")]
#[must_use = "returns a type implementing Debug and Display, which do not have any effects unless they are used"]
pub const fn from_fn<F: Fn(&mut fmt::Formatter<'_>) -> fmt::Result>(f: F) -> FromFn<F> {
FromFn(f)
+2 -2
View File
@@ -775,8 +775,8 @@ pub const fn unlikely(b: bool) -> bool {
/// }
/// }
/// ```
#[stable(feature = "cold_path", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "cold_path", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "cold_path", since = "1.95.0")]
#[rustc_const_stable(feature = "cold_path", since = "1.95.0")]
#[inline(always)]
pub const fn cold_path() {
crate::intrinsics::cold_path()
+3 -3
View File
@@ -206,7 +206,7 @@
#[macro_use]
mod macros;
#[stable(feature = "assert_matches", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "assert_matches", since = "1.95.0")]
pub use crate::macros::{assert_matches, debug_assert_matches};
#[unstable(feature = "derive_from", issue = "144889")]
@@ -227,7 +227,7 @@ pub mod autodiff {
#[unstable(feature = "contracts", issue = "128044")]
pub mod contracts;
#[stable(feature = "cfg_select", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "cfg_select", since = "1.95.0")]
pub use crate::macros::cfg_select;
#[macro_use]
@@ -307,7 +307,7 @@ pub mod autodiff {
pub mod pin;
#[unstable(feature = "random", issue = "130703")]
pub mod random;
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
pub mod range;
pub mod result;
pub mod sync;
+3 -3
View File
@@ -164,7 +164,7 @@ macro_rules! assert_ne {
/// assert_matches!(a, Some(x) if x > 100);
/// // assert_matches!(a, Some(x) if x < 100); // panics
/// ```
#[stable(feature = "assert_matches", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "assert_matches", since = "1.95.0")]
#[allow_internal_unstable(panic_internals)]
#[rustc_macro_transparency = "semiopaque"]
pub macro assert_matches {
@@ -228,7 +228,7 @@ macro_rules! assert_ne {
/// _ => { "Behind every successful diet is an unwatched pizza" }
/// };
/// ```
#[stable(feature = "cfg_select", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "cfg_select", since = "1.95.0")]
#[rustc_diagnostic_item = "cfg_select"]
#[rustc_builtin_macro]
pub macro cfg_select($($tt:tt)*) {
@@ -391,7 +391,7 @@ macro_rules! debug_assert_ne {
/// debug_assert_matches!(a, Some(x) if x > 100);
/// // debug_assert_matches!(a, Some(x) if x < 100); // panics
/// ```
#[stable(feature = "assert_matches", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "assert_matches", since = "1.95.0")]
#[allow_internal_unstable(assert_matches)]
#[rustc_macro_transparency = "semiopaque"]
pub macro debug_assert_matches($($arg:tt)*) {
+6 -6
View File
@@ -1532,7 +1532,7 @@ pub const fn as_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
}
}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T, const N: usize> From<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]> {
#[inline]
fn from(arr: [MaybeUninit<T>; N]) -> Self {
@@ -1540,7 +1540,7 @@ pub const fn as_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
}
}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T, const N: usize> AsRef<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]> {
#[inline]
fn as_ref(&self) -> &[MaybeUninit<T>; N] {
@@ -1549,7 +1549,7 @@ pub const fn as_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
}
}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T, const N: usize> AsRef<[MaybeUninit<T>]> for MaybeUninit<[T; N]> {
#[inline]
fn as_ref(&self) -> &[MaybeUninit<T>] {
@@ -1557,7 +1557,7 @@ fn as_ref(&self) -> &[MaybeUninit<T>] {
}
}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T, const N: usize> AsMut<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]> {
#[inline]
fn as_mut(&mut self) -> &mut [MaybeUninit<T>; N] {
@@ -1566,7 +1566,7 @@ fn as_ref(&self) -> &[MaybeUninit<T>] {
}
}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T, const N: usize> AsMut<[MaybeUninit<T>]> for MaybeUninit<[T; N]> {
#[inline]
fn as_mut(&mut self) -> &mut [MaybeUninit<T>] {
@@ -1574,7 +1574,7 @@ fn as_mut(&mut self) -> &mut [MaybeUninit<T>] {
}
}
#[stable(feature = "more_conversion_trait_impls", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "more_conversion_trait_impls", since = "1.95.0")]
impl<T, const N: usize> From<MaybeUninit<[T; N]>> for [MaybeUninit<T>; N] {
#[inline]
fn from(arr: MaybeUninit<[T; N]>) -> Self {
+2 -2
View File
@@ -151,7 +151,7 @@ impl<B, C> ControlFlow<B, C> {
/// ```
#[inline]
#[stable(feature = "control_flow_enum_is", since = "1.59.0")]
#[rustc_const_stable(feature = "min_const_control_flow", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "min_const_control_flow", since = "1.95.0")]
pub const fn is_break(&self) -> bool {
matches!(*self, ControlFlow::Break(_))
}
@@ -168,7 +168,7 @@ pub const fn is_break(&self) -> bool {
/// ```
#[inline]
#[stable(feature = "control_flow_enum_is", since = "1.59.0")]
#[rustc_const_stable(feature = "min_const_control_flow", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "min_const_control_flow", since = "1.95.0")]
pub const fn is_continue(&self) -> bool {
matches!(*self, ControlFlow::Continue(_))
}
+1 -1
View File
@@ -80,7 +80,7 @@ mod panic {}
#[doc(no_inline)]
pub use self::ambiguous_macros_only::{env, panic};
#[stable(feature = "cfg_select", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "cfg_select", since = "1.95.0")]
#[doc(no_inline)]
pub use crate::cfg_select;
+2 -2
View File
@@ -290,8 +290,8 @@ pub const fn to_raw_parts(self) -> (*const (), <T as super::Pointee>::Metadata)
/// assert_eq!(ptr.as_ref_unchecked(), &10);
/// }
/// ```
#[stable(feature = "ptr_as_ref_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ptr_as_ref_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ptr_as_ref_unchecked", since = "1.95.0")]
#[rustc_const_stable(feature = "ptr_as_ref_unchecked", since = "1.95.0")]
#[inline]
#[must_use]
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T {
+4 -4
View File
@@ -288,8 +288,8 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
/// println!("We got back the value: {}!", ptr.as_ref_unchecked());
/// }
/// ```
#[stable(feature = "ptr_as_ref_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ptr_as_ref_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ptr_as_ref_unchecked", since = "1.95.0")]
#[rustc_const_stable(feature = "ptr_as_ref_unchecked", since = "1.95.0")]
#[inline]
#[must_use]
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T {
@@ -611,8 +611,8 @@ pub fn mask(self, mask: usize) -> *mut T {
/// # assert_eq!(s, [4, 2, 3]);
/// println!("{s:?}"); // It'll print: "[4, 2, 3]".
/// ```
#[stable(feature = "ptr_as_ref_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ptr_as_ref_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ptr_as_ref_unchecked", since = "1.95.0")]
#[rustc_const_stable(feature = "ptr_as_ref_unchecked", since = "1.95.0")]
#[inline]
#[must_use]
pub const unsafe fn as_mut_unchecked<'a>(self) -> &'a mut T {
+13 -13
View File
@@ -25,7 +25,7 @@
pub mod legacy;
#[doc(inline)]
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
pub use iter::RangeInclusiveIter;
#[doc(inline)]
#[unstable(feature = "new_range_api", issue = "125687")]
@@ -245,17 +245,17 @@ fn from(value: legacy::Range<T>) -> Self {
/// ```
#[lang = "RangeInclusiveCopy"]
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
pub struct RangeInclusive<Idx> {
/// The lower bound of the range (inclusive).
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
pub start: Idx,
/// The upper bound of the range (inclusive).
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
pub last: Idx,
}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
impl<Idx: fmt::Debug> fmt::Debug for RangeInclusive<Idx> {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
self.start.fmt(fmt)?;
@@ -288,7 +288,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
/// assert!(!RangeInclusive::from(f32::NAN..=1.0).contains(&1.0));
/// ```
#[inline]
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[rustc_const_unstable(feature = "const_range", issue = "none")]
pub const fn contains<U>(&self, item: &U) -> bool
where
@@ -319,7 +319,7 @@ pub const fn contains<U>(&self, item: &U) -> bool
/// assert!( RangeInclusive::from(3.0..=f32::NAN).is_empty());
/// assert!( RangeInclusive::from(f32::NAN..=5.0).is_empty());
/// ```
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[inline]
#[rustc_const_unstable(feature = "const_range", issue = "none")]
pub const fn is_empty(&self) -> bool
@@ -345,14 +345,14 @@ impl<Idx: Step> RangeInclusive<Idx> {
/// assert_eq!(i.next(), Some(16));
/// assert_eq!(i.next(), Some(25));
/// ```
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[inline]
pub fn iter(&self) -> RangeInclusiveIter<Idx> {
self.clone().into_iter()
}
}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[rustc_const_unstable(feature = "const_range", issue = "none")]
impl<T> const RangeBounds<T> for RangeInclusive<T> {
fn start_bound(&self) -> Bound<&T> {
@@ -369,7 +369,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::Included(end))`.
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[rustc_const_unstable(feature = "const_range", issue = "none")]
impl<T> const RangeBounds<T> for RangeInclusive<&T> {
fn start_bound(&self) -> Bound<&T> {
@@ -380,7 +380,7 @@ fn end_bound(&self) -> Bound<&T> {
}
}
// #[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
// #[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[unstable(feature = "range_into_bounds", issue = "136903")]
#[rustc_const_unstable(feature = "const_range", issue = "none")]
impl<T> const IntoBounds<T> for RangeInclusive<T> {
@@ -389,7 +389,7 @@ fn into_bounds(self) -> (Bound<T>, Bound<T>) {
}
}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
impl<T> const From<RangeInclusive<T>> for legacy::RangeInclusive<T> {
#[inline]
@@ -397,7 +397,7 @@ fn from(value: RangeInclusive<T>) -> Self {
Self::new(value.start, value.last)
}
}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
impl<T> const From<legacy::RangeInclusive<T>> for RangeInclusive<T> {
#[inline]
+7 -7
View File
@@ -153,7 +153,7 @@ fn into_iter(self) -> Self::IntoIter {
}
/// By-value [`RangeInclusive`] iterator.
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[derive(Debug, Clone)]
pub struct RangeInclusiveIter<A>(legacy::RangeInclusive<A>);
@@ -161,7 +161,7 @@ impl<A: Step> RangeInclusiveIter<A> {
/// Returns the remainder of the range being iterated over.
///
/// If the iterator is exhausted or empty, returns `None`.
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
pub fn remainder(self) -> Option<RangeInclusive<A>> {
if self.0.is_empty() {
return None;
@@ -171,7 +171,7 @@ pub fn remainder(self) -> Option<RangeInclusive<A>> {
}
}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
impl<A: Step> Iterator for RangeInclusiveIter<A> {
type Item = A;
@@ -227,7 +227,7 @@ fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
}
}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
impl<A: Step> DoubleEndedIterator for RangeInclusiveIter<A> {
#[inline]
fn next_back(&mut self) -> Option<A> {
@@ -248,10 +248,10 @@ fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<A: TrustedStep> TrustedLen for RangeInclusiveIter<A> {}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
impl<A: Step> FusedIterator for RangeInclusiveIter<A> {}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
impl<A: Step> IntoIterator for RangeInclusive<A> {
type Item = A;
type IntoIter = RangeInclusiveIter<A>;
@@ -278,7 +278,7 @@ impl ExactSizeIterator for RangeIter<$t> { }
macro_rules! range_incl_exact_iter_impl {
($($t:ty)*) => ($(
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
impl ExactSizeIterator for RangeInclusiveIter<$t> { }
)*)
}
+2 -2
View File
@@ -127,7 +127,7 @@ impl Sealed for (ops::Bound<usize>, ops::Bound<usize>) {}
#[unstable(feature = "new_range_api", issue = "125687")]
impl Sealed for range::Range<usize> {}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
impl Sealed for range::RangeInclusive<usize> {}
#[stable(feature = "new_range_to_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
impl Sealed for range::RangeToInclusive<usize> {}
@@ -723,7 +723,7 @@ fn index_mut(self, slice: &mut [T]) -> &mut [T] {
}
}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
unsafe impl<T> const SliceIndex<[T]> for range::RangeInclusive<usize> {
type Output = [T];
+1 -1
View File
@@ -685,7 +685,7 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output {
}
}
#[stable(feature = "new_range_inclusive_api", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
unsafe impl const SliceIndex<str> for range::RangeInclusive<usize> {
type Output = str;
+6 -6
View File
@@ -1382,7 +1382,7 @@ pub fn fetch_update<F>(
/// assert_eq!(x.load(Ordering::SeqCst), false);
/// ```
#[inline]
#[stable(feature = "atomic_try_update", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_try_update", since = "1.95.0")]
#[cfg(target_has_atomic = "8")]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
#[rustc_should_not_be_called_on_const_items]
@@ -1445,7 +1445,7 @@ pub fn try_update(
/// assert_eq!(x.load(Ordering::SeqCst), false);
/// ```
#[inline]
#[stable(feature = "atomic_try_update", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_try_update", since = "1.95.0")]
#[cfg(target_has_atomic = "8")]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
#[rustc_should_not_be_called_on_const_items]
@@ -2067,7 +2067,7 @@ pub fn fetch_update<F>(
/// assert_eq!(some_ptr.load(Ordering::SeqCst), new);
/// ```
#[inline]
#[stable(feature = "atomic_try_update", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_try_update", since = "1.95.0")]
#[cfg(target_has_atomic = "ptr")]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
#[rustc_should_not_be_called_on_const_items]
@@ -2135,7 +2135,7 @@ pub fn try_update(
/// assert_eq!(some_ptr.load(Ordering::SeqCst), new);
/// ```
#[inline]
#[stable(feature = "atomic_try_update", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_try_update", since = "1.95.0")]
#[cfg(target_has_atomic = "8")]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
#[rustc_should_not_be_called_on_const_items]
@@ -3398,7 +3398,7 @@ pub fn fetch_update<F>(&self,
/// assert_eq!(x.load(Ordering::SeqCst), 9);
/// ```
#[inline]
#[stable(feature = "atomic_try_update", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_try_update", since = "1.95.0")]
#[$cfg_cas]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
#[rustc_should_not_be_called_on_const_items]
@@ -3464,7 +3464,7 @@ pub fn try_update(
/// assert_eq!(x.load(Ordering::SeqCst), 9);
/// ```
#[inline]
#[stable(feature = "atomic_try_update", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_try_update", since = "1.95.0")]
#[$cfg_cas]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
#[rustc_should_not_be_called_on_const_items]
+2 -2
View File
@@ -696,7 +696,7 @@ pub mod arch {
#[allow(dead_code, unused_attributes, fuzzy_provenance_casts, unsafe_op_in_unsafe_fn)]
mod backtrace_rs;
#[stable(feature = "cfg_select", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "cfg_select", since = "1.95.0")]
pub use core::cfg_select;
#[unstable(
feature = "concat_bytes",
@@ -726,7 +726,7 @@ pub mod arch {
assert_eq, assert_ne, debug_assert, debug_assert_eq, debug_assert_ne, r#try, unimplemented,
unreachable, write, writeln,
};
#[stable(feature = "assert_matches", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "assert_matches", since = "1.95.0")]
pub use core::{assert_matches, debug_assert_matches};
// Re-export unstable derive macro defined through core.
+1 -1
View File
@@ -79,7 +79,7 @@ mod panic {}
#[doc(no_inline)]
pub use self::ambiguous_macros_only::{vec, panic};
#[stable(feature = "cfg_select", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "cfg_select", since = "1.95.0")]
#[doc(no_inline)]
pub use core::prelude::v1::cfg_select;
@@ -49,7 +49,7 @@ pub fn __crc32d(crc: u32, data: u64) -> u32 {
#[inline(always)]
#[target_feature(enable = "jsconv")]
#[cfg_attr(test, assert_instr(fjcvtzs))]
#[stable(feature = "stdarch_aarch64_jscvt", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "stdarch_aarch64_jscvt", since = "1.95.0")]
pub fn __jcvt(a: f64) -> i32 {
unsafe extern "unadjusted" {
#[cfg_attr(
@@ -64,7 +64,7 @@ neon-unstable-feat-lut: &neon-unstable-feat-lut
FnCall: [unstable, ['feature = "stdarch_neon_feat_lut"', 'issue = "138050"']]
aarch64-stable-jscvt: &aarch64-stable-jscvt
FnCall: [stable, ['feature = "stdarch_aarch64_jscvt"', 'since = "CURRENT_RUSTC_VERSION"']]
FnCall: [stable, ['feature = "stdarch_aarch64_jscvt"', 'since = "1.95.0"']]
# #[unstable(feature = "stdarch_neon_feat_lrcpc3", issue = "none")]
neon-unstable-feat-lrcpc3: &neon-unstable-feat-lrcpc3