1
Fork 0

update version placeholders

This commit is contained in:
Pietro Albini 2025-01-06 20:28:08 +01:00
parent 6afee111c2
commit 4ae92b7adb
No known key found for this signature in database
GPG key ID: 3E06ABE80BAAF19C
27 changed files with 86 additions and 86 deletions

View file

@ -73,7 +73,7 @@ declare_features! (
/// Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions. /// Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
(accepted, async_await, "1.39.0", Some(50547)), (accepted, async_await, "1.39.0", Some(50547)),
/// Allows `async || body` closures. /// Allows `async || body` closures.
(accepted, async_closure, "CURRENT_RUSTC_VERSION", Some(62290)), (accepted, async_closure, "1.85.0", Some(62290)),
/// Allows async functions to be declared, implemented, and used in traits. /// Allows async functions to be declared, implemented, and used in traits.
(accepted, async_fn_in_trait, "1.75.0", Some(91611)), (accepted, async_fn_in_trait, "1.75.0", Some(91611)),
/// Allows all literals in attribute lists and values of key-value pairs. /// Allows all literals in attribute lists and values of key-value pairs.
@ -176,7 +176,7 @@ declare_features! (
/// Allows using the `#[diagnostic]` attribute tool namespace /// Allows using the `#[diagnostic]` attribute tool namespace
(accepted, diagnostic_namespace, "1.78.0", Some(111996)), (accepted, diagnostic_namespace, "1.78.0", Some(111996)),
/// Controls errors in trait implementations. /// Controls errors in trait implementations.
(accepted, do_not_recommend, "CURRENT_RUSTC_VERSION", Some(51992)), (accepted, do_not_recommend, "1.85.0", Some(51992)),
/// Allows `#[doc(alias = "...")]`. /// Allows `#[doc(alias = "...")]`.
(accepted, doc_alias, "1.48.0", Some(50146)), (accepted, doc_alias, "1.48.0", Some(50146)),
/// Allows `..` in tuple (struct) patterns. /// Allows `..` in tuple (struct) patterns.
@ -199,7 +199,7 @@ declare_features! (
(accepted, extended_key_value_attributes, "1.54.0", Some(78835)), (accepted, extended_key_value_attributes, "1.54.0", Some(78835)),
/// Allows using `efiapi`, `aapcs`, `sysv64` and `win64` as calling /// Allows using `efiapi`, `aapcs`, `sysv64` and `win64` as calling
/// convention for functions with varargs. /// convention for functions with varargs.
(accepted, extended_varargs_abi_support, "CURRENT_RUSTC_VERSION", Some(100189)), (accepted, extended_varargs_abi_support, "1.85.0", Some(100189)),
/// Allows resolving absolute paths as paths from other crates. /// Allows resolving absolute paths as paths from other crates.
(accepted, extern_absolute_paths, "1.30.0", Some(44660)), (accepted, extern_absolute_paths, "1.30.0", Some(44660)),
/// Allows `extern crate foo as bar;`. This puts `bar` into extern prelude. /// Allows `extern crate foo as bar;`. This puts `bar` into extern prelude.

View file

@ -120,7 +120,7 @@ declare_features! (
/// Allows defining generators. /// Allows defining generators.
(removed, generators, "1.21.0", Some(43122), Some("renamed to `coroutines`")), (removed, generators, "1.21.0", Some(43122), Some("renamed to `coroutines`")),
/// An extension to the `generic_associated_types` feature, allowing incomplete features. /// An extension to the `generic_associated_types` feature, allowing incomplete features.
(removed, generic_associated_types_extended, "CURRENT_RUSTC_VERSION", Some(95451), (removed, generic_associated_types_extended, "1.85.0", Some(95451),
Some( Some(
"feature needs overhaul and reimplementation pending \ "feature needs overhaul and reimplementation pending \
better implied higher-ranked implied bounds support" better implied higher-ranked implied bounds support"

View file

@ -333,7 +333,7 @@ declare_features! (
(unstable, hexagon_target_feature, "1.27.0", Some(44839)), (unstable, hexagon_target_feature, "1.27.0", Some(44839)),
(unstable, lahfsahf_target_feature, "1.78.0", Some(44839)), (unstable, lahfsahf_target_feature, "1.78.0", Some(44839)),
(unstable, loongarch_target_feature, "1.73.0", Some(44839)), (unstable, loongarch_target_feature, "1.73.0", Some(44839)),
(unstable, m68k_target_feature, "CURRENT_RUSTC_VERSION", Some(134328)), (unstable, m68k_target_feature, "1.85.0", Some(134328)),
(unstable, mips_target_feature, "1.27.0", Some(44839)), (unstable, mips_target_feature, "1.27.0", Some(44839)),
(unstable, powerpc_target_feature, "1.27.0", Some(44839)), (unstable, powerpc_target_feature, "1.27.0", Some(44839)),
(unstable, prfchw_target_feature, "1.78.0", Some(44839)), (unstable, prfchw_target_feature, "1.78.0", Some(44839)),
@ -344,7 +344,7 @@ declare_features! (
(unstable, sse4a_target_feature, "1.27.0", Some(44839)), (unstable, sse4a_target_feature, "1.27.0", Some(44839)),
(unstable, tbm_target_feature, "1.27.0", Some(44839)), (unstable, tbm_target_feature, "1.27.0", Some(44839)),
(unstable, wasm_target_feature, "1.30.0", Some(44839)), (unstable, wasm_target_feature, "1.30.0", Some(44839)),
(unstable, x87_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)), (unstable, x87_target_feature, "1.85.0", Some(44839)),
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
// Features are listed in alphabetical order. Tidy will fail if you don't keep it this way. // Features are listed in alphabetical order. Tidy will fail if you don't keep it this way.
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
@ -380,11 +380,11 @@ declare_features! (
/// Enables experimental inline assembly support for additional architectures. /// Enables experimental inline assembly support for additional architectures.
(unstable, asm_experimental_arch, "1.58.0", Some(93335)), (unstable, asm_experimental_arch, "1.58.0", Some(93335)),
/// Enables experimental register support in inline assembly. /// Enables experimental register support in inline assembly.
(unstable, asm_experimental_reg, "CURRENT_RUSTC_VERSION", Some(133416)), (unstable, asm_experimental_reg, "1.85.0", Some(133416)),
/// Allows using `label` operands in inline assembly. /// Allows using `label` operands in inline assembly.
(unstable, asm_goto, "1.78.0", Some(119364)), (unstable, asm_goto, "1.78.0", Some(119364)),
/// Allows using `label` operands in inline assembly together with output operands. /// Allows using `label` operands in inline assembly together with output operands.
(unstable, asm_goto_with_outputs, "CURRENT_RUSTC_VERSION", Some(119364)), (unstable, asm_goto_with_outputs, "1.85.0", Some(119364)),
/// Allows the `may_unwind` option in inline assembly. /// Allows the `may_unwind` option in inline assembly.
(unstable, asm_unwind, "1.58.0", Some(93334)), (unstable, asm_unwind, "1.58.0", Some(93334)),
/// Allows users to enforce equality of associated constants `TraitImpl<AssocConst=3>`. /// Allows users to enforce equality of associated constants `TraitImpl<AssocConst=3>`.
@ -392,13 +392,13 @@ declare_features! (
/// Allows associated type defaults. /// Allows associated type defaults.
(unstable, associated_type_defaults, "1.2.0", Some(29661)), (unstable, associated_type_defaults, "1.2.0", Some(29661)),
/// Allows async functions to be called from `dyn Trait`. /// Allows async functions to be called from `dyn Trait`.
(incomplete, async_fn_in_dyn_trait, "CURRENT_RUSTC_VERSION", Some(133119)), (incomplete, async_fn_in_dyn_trait, "1.85.0", Some(133119)),
/// Allows `#[track_caller]` on async functions. /// Allows `#[track_caller]` on async functions.
(unstable, async_fn_track_caller, "1.73.0", Some(110011)), (unstable, async_fn_track_caller, "1.73.0", Some(110011)),
/// Allows `for await` loops. /// Allows `for await` loops.
(unstable, async_for_loop, "1.77.0", Some(118898)), (unstable, async_for_loop, "1.77.0", Some(118898)),
/// Allows `async` trait bound modifier. /// Allows `async` trait bound modifier.
(unstable, async_trait_bounds, "CURRENT_RUSTC_VERSION", Some(62290)), (unstable, async_trait_bounds, "1.85.0", Some(62290)),
/// Allows using C-variadics. /// Allows using C-variadics.
(unstable, c_variadic, "1.34.0", Some(44930)), (unstable, c_variadic, "1.34.0", Some(44930)),
/// Allows the use of `#[cfg(<true/false>)]`. /// Allows the use of `#[cfg(<true/false>)]`.
@ -436,7 +436,7 @@ declare_features! (
/// Allows `const || {}` closures in const contexts. /// Allows `const || {}` closures in const contexts.
(incomplete, const_closures, "1.68.0", Some(106003)), (incomplete, const_closures, "1.68.0", Some(106003)),
/// Allows using `~const Destruct` bounds and calling drop impls in const contexts. /// Allows using `~const Destruct` bounds and calling drop impls in const contexts.
(unstable, const_destruct, "CURRENT_RUSTC_VERSION", Some(133214)), (unstable, const_destruct, "1.85.0", Some(133214)),
/// Allows `for _ in _` loops in const contexts. /// Allows `for _ in _` loops in const contexts.
(unstable, const_for, "1.56.0", Some(87575)), (unstable, const_for, "1.56.0", Some(87575)),
/// Be more precise when looking for live drops in a const context. /// Be more precise when looking for live drops in a const context.
@ -460,7 +460,7 @@ declare_features! (
(unstable, decl_macro, "1.17.0", Some(39412)), (unstable, decl_macro, "1.17.0", Some(39412)),
/// Allows the use of default values on struct definitions and the construction of struct /// Allows the use of default values on struct definitions and the construction of struct
/// literals with the functional update syntax without a base. /// literals with the functional update syntax without a base.
(unstable, default_field_values, "CURRENT_RUSTC_VERSION", Some(132162)), (unstable, default_field_values, "1.85.0", Some(132162)),
/// Allows using `#[deprecated_safe]` to deprecate the safeness of a function or trait /// Allows using `#[deprecated_safe]` to deprecate the safeness of a function or trait
(unstable, deprecated_safe, "1.61.0", Some(94978)), (unstable, deprecated_safe, "1.61.0", Some(94978)),
/// Allows having using `suggestion` in the `#[deprecated]` attribute. /// Allows having using `suggestion` in the `#[deprecated]` attribute.
@ -510,7 +510,7 @@ declare_features! (
/// Allows registering static items globally, possibly across crates, to iterate over at runtime. /// Allows registering static items globally, possibly across crates, to iterate over at runtime.
(unstable, global_registration, "1.80.0", Some(125119)), (unstable, global_registration, "1.80.0", Some(125119)),
/// Allows using guards in patterns. /// Allows using guards in patterns.
(incomplete, guard_patterns, "CURRENT_RUSTC_VERSION", Some(129967)), (incomplete, guard_patterns, "1.85.0", Some(129967)),
/// Allows using `..=X` as a patterns in slices. /// Allows using `..=X` as a patterns in slices.
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)), (unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
/// Allows `if let` guard in match arms. /// Allows `if let` guard in match arms.
@ -639,9 +639,9 @@ declare_features! (
/// not changed from prior instances of the same struct (RFC #2528) /// not changed from prior instances of the same struct (RFC #2528)
(unstable, type_changing_struct_update, "1.58.0", Some(86555)), (unstable, type_changing_struct_update, "1.58.0", Some(86555)),
/// Allows using `unsafe<'a> &'a T` unsafe binder types. /// Allows using `unsafe<'a> &'a T` unsafe binder types.
(incomplete, unsafe_binders, "CURRENT_RUSTC_VERSION", Some(130516)), (incomplete, unsafe_binders, "1.85.0", Some(130516)),
/// Allows declaring fields `unsafe`. /// Allows declaring fields `unsafe`.
(incomplete, unsafe_fields, "CURRENT_RUSTC_VERSION", Some(132922)), (incomplete, unsafe_fields, "1.85.0", Some(132922)),
/// Allows const generic parameters to be defined with types that /// Allows const generic parameters to be defined with types that
/// are not `Sized`, e.g. `fn foo<const N: [u8]>() {`. /// are not `Sized`, e.g. `fn foo<const N: [u8]>() {`.
(incomplete, unsized_const_params, "1.82.0", Some(95174)), (incomplete, unsized_const_params, "1.82.0", Some(95174)),

View file

@ -2029,7 +2029,7 @@ impl<Args: Tuple, F: Fn<Args> + ?Sized, A: Allocator> Fn<Args> for Box<F, A> {
} }
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator> AsyncFnOnce<Args> for Box<F, A> { impl<Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator> AsyncFnOnce<Args> for Box<F, A> {
type Output = F::Output; type Output = F::Output;
type CallOnceFuture = F::CallOnceFuture; type CallOnceFuture = F::CallOnceFuture;
@ -2040,7 +2040,7 @@ impl<Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator> AsyncFnOnce<Args>
} }
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator> AsyncFnMut<Args> for Box<F, A> { impl<Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator> AsyncFnMut<Args> for Box<F, A> {
type CallRefFuture<'a> type CallRefFuture<'a>
= F::CallRefFuture<'a> = F::CallRefFuture<'a>
@ -2053,7 +2053,7 @@ impl<Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator> AsyncFnMut<Args> f
} }
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<Args: Tuple, F: AsyncFn<Args> + ?Sized, A: Allocator> AsyncFn<Args> for Box<F, A> { impl<Args: Tuple, F: AsyncFn<Args> + ?Sized, A: Allocator> AsyncFn<Args> for Box<F, A> {
extern "rust-call" fn async_call(&self, args: Args) -> Self::CallRefFuture<'_> { extern "rust-call" fn async_call(&self, args: Args) -> Self::CallRefFuture<'_> {
F::async_call(self, args) F::async_call(self, args)

View file

@ -178,7 +178,7 @@ impl Layout {
/// allocate backing structure for `T` (which could be a trait /// allocate backing structure for `T` (which could be a trait
/// or other unsized type like a slice). /// or other unsized type like a slice).
#[stable(feature = "alloc_layout", since = "1.28.0")] #[stable(feature = "alloc_layout", since = "1.28.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[must_use] #[must_use]
#[inline] #[inline]
pub const fn for_value<T: ?Sized>(t: &T) -> Self { pub const fn for_value<T: ?Sized>(t: &T) -> Self {
@ -252,7 +252,7 @@ impl Layout {
/// Returns an error if the combination of `self.size()` and the given /// Returns an error if the combination of `self.size()` and the given
/// `align` violates the conditions listed in [`Layout::from_size_align`]. /// `align` violates the conditions listed in [`Layout::from_size_align`].
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")] #[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[inline] #[inline]
pub const fn align_to(&self, align: usize) -> Result<Self, LayoutError> { pub const fn align_to(&self, align: usize) -> Result<Self, LayoutError> {
if let Some(align) = Alignment::new(align) { if let Some(align) = Alignment::new(align) {
@ -327,7 +327,7 @@ impl Layout {
/// This is equivalent to adding the result of `padding_needed_for` /// This is equivalent to adding the result of `padding_needed_for`
/// to the layout's current size. /// to the layout's current size.
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")] #[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[must_use = "this returns a new `Layout`, \ #[must_use = "this returns a new `Layout`, \
without modifying the original"] without modifying the original"]
#[inline] #[inline]
@ -426,7 +426,7 @@ impl Layout {
/// # assert_eq!(repr_c(&[u64, u32, u16, u32]), Ok((s, vec![0, 8, 12, 16]))); /// # assert_eq!(repr_c(&[u64, u32, u16, u32]), Ok((s, vec![0, 8, 12, 16])));
/// ``` /// ```
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")] #[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[inline] #[inline]
pub const fn extend(&self, next: Self) -> Result<(Self, usize), LayoutError> { pub const fn extend(&self, next: Self) -> Result<(Self, usize), LayoutError> {
let new_align = Alignment::max(self.align, next.align); let new_align = Alignment::max(self.align, next.align);
@ -489,7 +489,7 @@ impl Layout {
/// On arithmetic overflow or when the total size would exceed /// On arithmetic overflow or when the total size would exceed
/// `isize::MAX`, returns `LayoutError`. /// `isize::MAX`, returns `LayoutError`.
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")] #[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_stable(feature = "const_alloc_layout", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_alloc_layout", since = "1.85.0")]
#[inline] #[inline]
pub const fn array<T>(n: usize) -> Result<Self, LayoutError> { pub const fn array<T>(n: usize) -> Result<Self, LayoutError> {
// Reduce the amount of code we need to monomorphize per `T`. // Reduce the amount of code we need to monomorphize per `T`.

View file

@ -752,10 +752,10 @@ pub struct BuildHasherDefault<H>(marker::PhantomData<fn() -> H>);
impl<H> BuildHasherDefault<H> { impl<H> BuildHasherDefault<H> {
/// Creates a new BuildHasherDefault for Hasher `H`. /// Creates a new BuildHasherDefault for Hasher `H`.
#[stable(feature = "build_hasher_default_const_new", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "build_hasher_default_const_new", since = "1.85.0")]
#[rustc_const_stable( #[rustc_const_stable(
feature = "build_hasher_default_const_new", feature = "build_hasher_default_const_new",
since = "CURRENT_RUSTC_VERSION" since = "1.85.0"
)] )]
pub const fn new() -> Self { pub const fn new() -> Self {
BuildHasherDefault(marker::PhantomData) BuildHasherDefault(marker::PhantomData)

View file

@ -472,7 +472,7 @@ macro_rules! spec_tuple_impl {
#[doc(fake_variadic)] #[doc(fake_variadic)]
#[doc = "This trait is implemented for tuples up to twelve items long. The `impl`s for \ #[doc = "This trait is implemented for tuples up to twelve items long. The `impl`s for \
1- and 3- through 12-ary tuples were stabilized after 2-tuples, in \ 1- and 3- through 12-ary tuples were stabilized after 2-tuples, in \
CURRENT_RUSTC_VERSION."] 1.85.0."]
=> ($ty_name, $var_name, $extend_ty_name, $cnt), => ($ty_name, $var_name, $extend_ty_name, $cnt),
); );
}; };

View file

@ -507,7 +507,7 @@ impl<T> MaybeUninit<T> {
/// ``` /// ```
#[inline(always)] #[inline(always)]
#[stable(feature = "maybe_uninit_write", since = "1.55.0")] #[stable(feature = "maybe_uninit_write", since = "1.55.0")]
#[rustc_const_stable(feature = "const_maybe_uninit_write", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_maybe_uninit_write", since = "1.85.0")]
pub const fn write(&mut self, val: T) -> &mut T { pub const fn write(&mut self, val: T) -> &mut T {
*self = MaybeUninit::new(val); *self = MaybeUninit::new(val);
// SAFETY: We just initialized this value. // SAFETY: We just initialized this value.

View file

@ -333,7 +333,7 @@ pub const fn size_of<T>() -> usize {
#[inline] #[inline]
#[must_use] #[must_use]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_size_of_val", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_size_of_val", since = "1.85.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "mem_size_of_val")] #[cfg_attr(not(test), rustc_diagnostic_item = "mem_size_of_val")]
pub const fn size_of_val<T: ?Sized>(val: &T) -> usize { pub const fn size_of_val<T: ?Sized>(val: &T) -> usize {
// SAFETY: `val` is a reference, so it's a valid raw pointer // SAFETY: `val` is a reference, so it's a valid raw pointer
@ -484,7 +484,7 @@ pub const fn align_of<T>() -> usize {
#[inline] #[inline]
#[must_use] #[must_use]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_align_of_val", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_align_of_val", since = "1.85.0")]
#[allow(deprecated)] #[allow(deprecated)]
pub const fn align_of_val<T: ?Sized>(val: &T) -> usize { pub const fn align_of_val<T: ?Sized>(val: &T) -> usize {
// SAFETY: val is a reference, so it's a valid raw pointer // SAFETY: val is a reference, so it's a valid raw pointer
@ -725,7 +725,7 @@ pub unsafe fn uninitialized<T>() -> T {
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_swap", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_swap", since = "1.85.0")]
#[rustc_diagnostic_item = "mem_swap"] #[rustc_diagnostic_item = "mem_swap"]
pub const fn swap<T>(x: &mut T, y: &mut T) { pub const fn swap<T>(x: &mut T, y: &mut T) {
// SAFETY: `&mut` guarantees these are typed readable and writable // SAFETY: `&mut` guarantees these are typed readable and writable

View file

@ -818,7 +818,7 @@ impl f32 {
/// ``` /// ```
#[must_use = "this returns the result of the operation, without modifying the original"] #[must_use = "this returns the result of the operation, without modifying the original"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn recip(self) -> f32 { pub const fn recip(self) -> f32 {
1.0 / self 1.0 / self
@ -836,7 +836,7 @@ impl f32 {
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[stable(feature = "f32_deg_rad_conversions", since = "1.7.0")] #[stable(feature = "f32_deg_rad_conversions", since = "1.7.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn to_degrees(self) -> f32 { pub const fn to_degrees(self) -> f32 {
// Use a constant for better precision. // Use a constant for better precision.
@ -856,7 +856,7 @@ impl f32 {
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[stable(feature = "f32_deg_rad_conversions", since = "1.7.0")] #[stable(feature = "f32_deg_rad_conversions", since = "1.7.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn to_radians(self) -> f32 { pub const fn to_radians(self) -> f32 {
const RADS_PER_DEG: f32 = consts::PI / 180.0; const RADS_PER_DEG: f32 = consts::PI / 180.0;
@ -878,7 +878,7 @@ impl f32 {
/// ``` /// ```
#[must_use = "this returns the result of the comparison, without modifying either input"] #[must_use = "this returns the result of the comparison, without modifying either input"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn max(self, other: f32) -> f32 { pub const fn max(self, other: f32) -> f32 {
intrinsics::maxnumf32(self, other) intrinsics::maxnumf32(self, other)
@ -899,7 +899,7 @@ impl f32 {
/// ``` /// ```
#[must_use = "this returns the result of the comparison, without modifying either input"] #[must_use = "this returns the result of the comparison, without modifying either input"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn min(self, other: f32) -> f32 { pub const fn min(self, other: f32) -> f32 {
intrinsics::minnumf32(self, other) intrinsics::minnumf32(self, other)
@ -988,8 +988,8 @@ impl f32 {
/// assert_eq!((-5.5f32).midpoint(8.0), 1.25); /// assert_eq!((-5.5f32).midpoint(8.0), 1.25);
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "num_midpoint", since = "1.85.0")]
#[rustc_const_stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "num_midpoint", since = "1.85.0")]
pub const fn midpoint(self, other: f32) -> f32 { pub const fn midpoint(self, other: f32) -> f32 {
cfg_if! { cfg_if! {
// Allow faster implementation that have known good 64-bit float // Allow faster implementation that have known good 64-bit float
@ -1396,7 +1396,7 @@ impl f32 {
/// ``` /// ```
#[must_use = "method returns a new number and does not mutate the original value"] #[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "clamp", since = "1.50.0")] #[stable(feature = "clamp", since = "1.50.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn clamp(mut self, min: f32, max: f32) -> f32 { pub const fn clamp(mut self, min: f32, max: f32) -> f32 {
const_assert!( const_assert!(
@ -1433,7 +1433,7 @@ impl f32 {
/// ``` /// ```
#[must_use = "method returns a new number and does not mutate the original value"] #[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn abs(self) -> f32 { pub const fn abs(self) -> f32 {
// SAFETY: this is actually a safe intrinsic // SAFETY: this is actually a safe intrinsic
@ -1458,7 +1458,7 @@ impl f32 {
/// ``` /// ```
#[must_use = "method returns a new number and does not mutate the original value"] #[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn signum(self) -> f32 { pub const fn signum(self) -> f32 {
if self.is_nan() { Self::NAN } else { 1.0_f32.copysign(self) } if self.is_nan() { Self::NAN } else { 1.0_f32.copysign(self) }
@ -1493,7 +1493,7 @@ impl f32 {
#[must_use = "method returns a new number and does not mutate the original value"] #[must_use = "method returns a new number and does not mutate the original value"]
#[inline] #[inline]
#[stable(feature = "copysign", since = "1.35.0")] #[stable(feature = "copysign", since = "1.35.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
pub const fn copysign(self, sign: f32) -> f32 { pub const fn copysign(self, sign: f32) -> f32 {
// SAFETY: this is actually a safe intrinsic // SAFETY: this is actually a safe intrinsic
unsafe { intrinsics::copysignf32(self, sign) } unsafe { intrinsics::copysignf32(self, sign) }

View file

@ -835,7 +835,7 @@ impl f64 {
/// ``` /// ```
#[must_use = "this returns the result of the operation, without modifying the original"] #[must_use = "this returns the result of the operation, without modifying the original"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn recip(self) -> f64 { pub const fn recip(self) -> f64 {
1.0 / self 1.0 / self
@ -853,7 +853,7 @@ impl f64 {
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn to_degrees(self) -> f64 { pub const fn to_degrees(self) -> f64 {
// The division here is correctly rounded with respect to the true // The division here is correctly rounded with respect to the true
@ -874,7 +874,7 @@ impl f64 {
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn to_radians(self) -> f64 { pub const fn to_radians(self) -> f64 {
const RADS_PER_DEG: f64 = consts::PI / 180.0; const RADS_PER_DEG: f64 = consts::PI / 180.0;
@ -896,7 +896,7 @@ impl f64 {
/// ``` /// ```
#[must_use = "this returns the result of the comparison, without modifying either input"] #[must_use = "this returns the result of the comparison, without modifying either input"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn max(self, other: f64) -> f64 { pub const fn max(self, other: f64) -> f64 {
intrinsics::maxnumf64(self, other) intrinsics::maxnumf64(self, other)
@ -917,7 +917,7 @@ impl f64 {
/// ``` /// ```
#[must_use = "this returns the result of the comparison, without modifying either input"] #[must_use = "this returns the result of the comparison, without modifying either input"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn min(self, other: f64) -> f64 { pub const fn min(self, other: f64) -> f64 {
intrinsics::minnumf64(self, other) intrinsics::minnumf64(self, other)
@ -1006,8 +1006,8 @@ impl f64 {
/// assert_eq!((-5.5f64).midpoint(8.0), 1.25); /// assert_eq!((-5.5f64).midpoint(8.0), 1.25);
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "num_midpoint", since = "1.85.0")]
#[rustc_const_stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "num_midpoint", since = "1.85.0")]
pub const fn midpoint(self, other: f64) -> f64 { pub const fn midpoint(self, other: f64) -> f64 {
const LO: f64 = f64::MIN_POSITIVE * 2.; const LO: f64 = f64::MIN_POSITIVE * 2.;
const HI: f64 = f64::MAX / 2.; const HI: f64 = f64::MAX / 2.;
@ -1396,7 +1396,7 @@ impl f64 {
/// ``` /// ```
#[must_use = "method returns a new number and does not mutate the original value"] #[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "clamp", since = "1.50.0")] #[stable(feature = "clamp", since = "1.50.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn clamp(mut self, min: f64, max: f64) -> f64 { pub const fn clamp(mut self, min: f64, max: f64) -> f64 {
const_assert!( const_assert!(
@ -1433,7 +1433,7 @@ impl f64 {
/// ``` /// ```
#[must_use = "method returns a new number and does not mutate the original value"] #[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn abs(self) -> f64 { pub const fn abs(self) -> f64 {
// SAFETY: this is actually a safe intrinsic // SAFETY: this is actually a safe intrinsic
@ -1458,7 +1458,7 @@ impl f64 {
/// ``` /// ```
#[must_use = "method returns a new number and does not mutate the original value"] #[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn signum(self) -> f64 { pub const fn signum(self) -> f64 {
if self.is_nan() { Self::NAN } else { 1.0_f64.copysign(self) } if self.is_nan() { Self::NAN } else { 1.0_f64.copysign(self) }
@ -1492,7 +1492,7 @@ impl f64 {
/// ``` /// ```
#[must_use = "method returns a new number and does not mutate the original value"] #[must_use = "method returns a new number and does not mutate the original value"]
#[stable(feature = "copysign", since = "1.35.0")] #[stable(feature = "copysign", since = "1.35.0")]
#[rustc_const_stable(feature = "const_float_methods", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_float_methods", since = "1.85.0")]
#[inline] #[inline]
pub const fn copysign(self, sign: f64) -> f64 { pub const fn copysign(self, sign: f64) -> f64 {
// SAFETY: this is actually a safe intrinsic // SAFETY: this is actually a safe intrinsic

View file

@ -138,8 +138,8 @@ macro_rules! midpoint_impl {
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".midpoint(4), 2);")] #[doc = concat!("assert_eq!(0", stringify!($SelfT), ".midpoint(4), 2);")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".midpoint(4), 2);")] #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".midpoint(4), 2);")]
/// ``` /// ```
#[stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "num_midpoint", since = "1.85.0")]
#[rustc_const_stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "num_midpoint", since = "1.85.0")]
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[inline] #[inline]
@ -192,8 +192,8 @@ macro_rules! midpoint_impl {
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".midpoint(4), 2);")] #[doc = concat!("assert_eq!(0", stringify!($SelfT), ".midpoint(4), 2);")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".midpoint(4), 2);")] #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".midpoint(4), 2);")]
/// ``` /// ```
#[stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "num_midpoint", since = "1.85.0")]
#[rustc_const_stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "num_midpoint", since = "1.85.0")]
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[inline] #[inline]

View file

@ -1543,8 +1543,8 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
/// # Some(()) /// # Some(())
/// # } /// # }
/// ``` /// ```
#[stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "num_midpoint", since = "1.85.0")]
#[rustc_const_stable(feature = "num_midpoint", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "num_midpoint", since = "1.85.0")]
#[must_use = "this returns the result of the operation, \ #[must_use = "this returns the result of the operation, \
without modifying the original"] without modifying the original"]
#[inline] #[inline]

View file

@ -5,7 +5,7 @@ use crate::marker::Tuple;
/// ///
/// All `async fn` and functions returning futures implement this trait. /// All `async fn` and functions returning futures implement this trait.
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
#[rustc_paren_sugar] #[rustc_paren_sugar]
#[fundamental] #[fundamental]
#[must_use = "async closures are lazy and do nothing unless called"] #[must_use = "async closures are lazy and do nothing unless called"]
@ -20,7 +20,7 @@ pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
/// ///
/// All `async fn` and functions returning futures implement this trait. /// All `async fn` and functions returning futures implement this trait.
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
#[rustc_paren_sugar] #[rustc_paren_sugar]
#[fundamental] #[fundamental]
#[must_use = "async closures are lazy and do nothing unless called"] #[must_use = "async closures are lazy and do nothing unless called"]
@ -42,7 +42,7 @@ pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
/// ///
/// All `async fn` and functions returning futures implement this trait. /// All `async fn` and functions returning futures implement this trait.
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
#[rustc_paren_sugar] #[rustc_paren_sugar]
#[fundamental] #[fundamental]
#[must_use = "async closures are lazy and do nothing unless called"] #[must_use = "async closures are lazy and do nothing unless called"]
@ -68,7 +68,7 @@ mod impls {
use crate::marker::Tuple; use crate::marker::Tuple;
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<A: Tuple, F: ?Sized> AsyncFn<A> for &F impl<A: Tuple, F: ?Sized> AsyncFn<A> for &F
where where
F: AsyncFn<A>, F: AsyncFn<A>,
@ -79,7 +79,7 @@ mod impls {
} }
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<A: Tuple, F: ?Sized> AsyncFnMut<A> for &F impl<A: Tuple, F: ?Sized> AsyncFnMut<A> for &F
where where
F: AsyncFn<A>, F: AsyncFn<A>,
@ -95,7 +95,7 @@ mod impls {
} }
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<'a, A: Tuple, F: ?Sized> AsyncFnOnce<A> for &'a F impl<'a, A: Tuple, F: ?Sized> AsyncFnOnce<A> for &'a F
where where
F: AsyncFn<A>, F: AsyncFn<A>,
@ -109,7 +109,7 @@ mod impls {
} }
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<A: Tuple, F: ?Sized> AsyncFnMut<A> for &mut F impl<A: Tuple, F: ?Sized> AsyncFnMut<A> for &mut F
where where
F: AsyncFnMut<A>, F: AsyncFnMut<A>,
@ -125,7 +125,7 @@ mod impls {
} }
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
impl<'a, A: Tuple, F: ?Sized> AsyncFnOnce<A> for &'a mut F impl<'a, A: Tuple, F: ?Sized> AsyncFnOnce<A> for &'a mut F
where where
F: AsyncFnMut<A>, F: AsyncFnMut<A>,

View file

@ -71,7 +71,7 @@ pub mod rust_2021 {
/// The 2024 version of the core prelude. /// The 2024 version of the core prelude.
/// ///
/// See the [module-level documentation](self) for more. /// See the [module-level documentation](self) for more.
#[stable(feature = "prelude_2024", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "prelude_2024", since = "1.85.0")]
pub mod rust_2024 { pub mod rust_2024 {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::common::*; pub use super::common::*;
@ -84,7 +84,7 @@ pub mod rust_2024 {
#[doc(no_inline)] #[doc(no_inline)]
pub use crate::convert::{TryFrom, TryInto}; pub use crate::convert::{TryFrom, TryInto};
#[stable(feature = "prelude_2024", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "prelude_2024", since = "1.85.0")]
#[doc(no_inline)] #[doc(no_inline)]
pub use crate::future::{Future, IntoFuture}; pub use crate::future::{Future, IntoFuture};
} }

View file

@ -1009,7 +1009,7 @@ pub const fn slice_from_raw_parts_mut<T>(data: *mut T, len: usize) -> *mut [T] {
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_swap", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_swap", since = "1.85.0")]
#[rustc_diagnostic_item = "ptr_swap"] #[rustc_diagnostic_item = "ptr_swap"]
pub const unsafe fn swap<T>(x: *mut T, y: *mut T) { pub const unsafe fn swap<T>(x: *mut T, y: *mut T) {
// Give ourselves some scratch space to work with. // Give ourselves some scratch space to work with.
@ -2150,7 +2150,7 @@ pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool {
/// ``` /// ```
/// ///
/// [subtype]: https://doc.rust-lang.org/reference/subtyping.html /// [subtype]: https://doc.rust-lang.org/reference/subtyping.html
#[stable(feature = "ptr_fn_addr_eq", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "ptr_fn_addr_eq", since = "1.85.0")]
#[inline(always)] #[inline(always)]
#[must_use = "function pointer comparison produces a value"] #[must_use = "function pointer comparison produces a value"]
pub fn fn_addr_eq<T: FnPtr, U: FnPtr>(f: T, g: U) -> bool { pub fn fn_addr_eq<T: FnPtr, U: FnPtr>(f: T, g: U) -> bool {

View file

@ -1594,7 +1594,7 @@ impl<T: ?Sized> *mut T {
/// ///
/// [`ptr::swap`]: crate::ptr::swap() /// [`ptr::swap`]: crate::ptr::swap()
#[stable(feature = "pointer_methods", since = "1.26.0")] #[stable(feature = "pointer_methods", since = "1.26.0")]
#[rustc_const_stable(feature = "const_swap", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_swap", since = "1.85.0")]
#[inline(always)] #[inline(always)]
pub const unsafe fn swap(self, with: *mut T) pub const unsafe fn swap(self, with: *mut T)
where where

View file

@ -224,7 +224,7 @@ impl<T: ?Sized> NonNull<T> {
/// } /// }
/// ``` /// ```
#[stable(feature = "nonnull", since = "1.25.0")] #[stable(feature = "nonnull", since = "1.25.0")]
#[rustc_const_stable(feature = "const_nonnull_new", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_nonnull_new", since = "1.85.0")]
#[inline] #[inline]
pub const fn new(ptr: *mut T) -> Option<Self> { pub const fn new(ptr: *mut T) -> Option<Self> {
if !ptr.is_null() { if !ptr.is_null() {
@ -1146,7 +1146,7 @@ impl<T: ?Sized> NonNull<T> {
/// [`ptr::swap`]: crate::ptr::swap() /// [`ptr::swap`]: crate::ptr::swap()
#[inline(always)] #[inline(always)]
#[stable(feature = "non_null_convenience", since = "1.80.0")] #[stable(feature = "non_null_convenience", since = "1.80.0")]
#[rustc_const_stable(feature = "const_swap", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_swap", since = "1.85.0")]
pub const unsafe fn swap(self, with: NonNull<T>) pub const unsafe fn swap(self, with: NonNull<T>)
where where
T: Sized, T: Sized,

View file

@ -913,7 +913,7 @@ impl<T> [T] {
/// assert!(v == ["a", "b", "e", "d", "c"]); /// assert!(v == ["a", "b", "e", "d", "c"]);
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_swap", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "const_swap", since = "1.85.0")]
#[inline] #[inline]
#[track_caller] #[track_caller]
pub const fn swap(&mut self, a: usize, b: usize) { pub const fn swap(&mut self, a: usize, b: usize) {

View file

@ -60,7 +60,7 @@ impl RawWaker {
RawWaker { data, vtable } RawWaker { data, vtable }
} }
#[stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "noop_waker", since = "1.85.0")]
const NOOP: RawWaker = { const NOOP: RawWaker = {
const VTABLE: RawWakerVTable = RawWakerVTable::new( const VTABLE: RawWakerVTable = RawWakerVTable::new(
// Cloning just returns a new no-op raw waker // Cloning just returns a new no-op raw waker
@ -564,8 +564,8 @@ impl Waker {
/// ``` /// ```
#[inline] #[inline]
#[must_use] #[must_use]
#[stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "noop_waker", since = "1.85.0")]
#[rustc_const_stable(feature = "noop_waker", since = "CURRENT_RUSTC_VERSION")] #[rustc_const_stable(feature = "noop_waker", since = "1.85.0")]
pub const fn noop() -> &'static Waker { pub const fn noop() -> &'static Waker {
const WAKER: &Waker = &Waker { waker: RawWaker::NOOP }; const WAKER: &Waker = &Waker { waker: RawWaker::NOOP };
WAKER WAKER

View file

@ -298,7 +298,7 @@ impl<K, V, S> HashMap<K, V, S> {
#[stable(feature = "hashmap_build_hasher", since = "1.7.0")] #[stable(feature = "hashmap_build_hasher", since = "1.7.0")]
#[rustc_const_stable( #[rustc_const_stable(
feature = "const_collections_with_hasher", feature = "const_collections_with_hasher",
since = "CURRENT_RUSTC_VERSION" since = "1.85.0"
)] )]
pub const fn with_hasher(hash_builder: S) -> HashMap<K, V, S> { pub const fn with_hasher(hash_builder: S) -> HashMap<K, V, S> {
HashMap { base: base::HashMap::with_hasher(hash_builder) } HashMap { base: base::HashMap::with_hasher(hash_builder) }

View file

@ -390,7 +390,7 @@ impl<T, S> HashSet<T, S> {
#[stable(feature = "hashmap_build_hasher", since = "1.7.0")] #[stable(feature = "hashmap_build_hasher", since = "1.7.0")]
#[rustc_const_stable( #[rustc_const_stable(
feature = "const_collections_with_hasher", feature = "const_collections_with_hasher",
since = "CURRENT_RUSTC_VERSION" since = "1.85.0"
)] )]
pub const fn with_hasher(hasher: S) -> HashSet<T, S> { pub const fn with_hasher(hasher: S) -> HashSet<T, S> {
HashSet { base: base::HashSet::with_hasher(hasher) } HashSet { base: base::HashSet::with_hasher(hasher) }

View file

@ -622,7 +622,7 @@ impl Error for JoinPathsError {
/// ///
/// In UWP (Universal Windows Platform) targets this function is unimplemented and always returns `None`. /// In UWP (Universal Windows Platform) targets this function is unimplemented and always returns `None`.
/// ///
/// Before Rust CURRENT_RUSTC_VERSION, this function used to return the value of the 'HOME' environment variable /// Before Rust 1.85.0, this function used to return the value of the 'HOME' environment variable
/// on Windows, which in Cygwin or Mingw environments could return non-standard paths like `/home/you` /// on Windows, which in Cygwin or Mingw environments could return non-standard paths like `/home/you`
/// instead of `C:\Users\you`. /// instead of `C:\Users\you`.
/// ///

View file

@ -339,7 +339,7 @@ pub enum ErrorKind {
#[stable(feature = "io_error_a_bit_more", since = "1.83.0")] #[stable(feature = "io_error_a_bit_more", since = "1.83.0")]
NotSeekable, NotSeekable,
/// Filesystem quota or some other kind of quota was exceeded. /// Filesystem quota or some other kind of quota was exceeded.
#[stable(feature = "io_error_quota_exceeded", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "io_error_quota_exceeded", since = "1.85.0")]
QuotaExceeded, QuotaExceeded,
/// File larger than allowed or supported. /// File larger than allowed or supported.
/// ///
@ -364,7 +364,7 @@ pub enum ErrorKind {
#[stable(feature = "io_error_a_bit_more", since = "1.83.0")] #[stable(feature = "io_error_a_bit_more", since = "1.83.0")]
Deadlock, Deadlock,
/// Cross-device or cross-filesystem (hard) link or rename. /// Cross-device or cross-filesystem (hard) link or rename.
#[stable(feature = "io_error_crosses_devices", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "io_error_crosses_devices", since = "1.85.0")]
CrossesDevices, CrossesDevices,
/// Too many (hard) links to the same filesystem object. /// Too many (hard) links to the same filesystem object.
/// ///

View file

@ -13,7 +13,7 @@ pub use crate::marker::{Send, Sized, Sync, Unpin};
#[doc(no_inline)] #[doc(no_inline)]
pub use crate::ops::{Drop, Fn, FnMut, FnOnce}; pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
#[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))] #[cfg_attr(bootstrap, unstable(feature = "async_closure", issue = "62290"))]
#[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "CURRENT_RUSTC_VERSION"))] #[cfg_attr(not(bootstrap), stable(feature = "async_closure", since = "1.85.0"))]
#[doc(no_inline)] #[doc(no_inline)]
pub use crate::ops::{AsyncFn, AsyncFnMut, AsyncFnOnce}; pub use crate::ops::{AsyncFn, AsyncFnMut, AsyncFnOnce};

View file

@ -169,12 +169,12 @@ pub mod rust_2021 {
/// The 2024 version of the prelude of The Rust Standard Library. /// The 2024 version of the prelude of The Rust Standard Library.
/// ///
/// See the [module-level documentation](self) for more. /// See the [module-level documentation](self) for more.
#[stable(feature = "prelude_2024", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "prelude_2024", since = "1.85.0")]
pub mod rust_2024 { pub mod rust_2024 {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::common::*; pub use super::common::*;
#[stable(feature = "prelude_2024", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "prelude_2024", since = "1.85.0")]
#[doc(no_inline)] #[doc(no_inline)]
pub use core::prelude::rust_2024::*; pub use core::prelude::rust_2024::*;
} }

View file

@ -134,7 +134,7 @@ As of `2025-01-02T`, the list of known names is as follows:
- `unix` - `unix`
- `windows` - `windows`
> Starting with CURRENT_RUSTC_VERSION, the `test` cfg is consider to be a "userspace" config > Starting with 1.85.0, the `test` cfg is consider to be a "userspace" config
> despite being also set by `rustc` and should be managed by the build-system it-self. > despite being also set by `rustc` and should be managed by the build-system it-self.
Like with `values(any())`, well known names checking can be disabled by passing `cfg(any())` Like with `values(any())`, well known names checking can be disabled by passing `cfg(any())`