Substitute version placeholders

This commit is contained in:
Mark Rousskov 2023-11-12 11:45:28 -05:00
parent 6b771f6b5a
commit efe54e24aa
19 changed files with 80 additions and 80 deletions

View File

@ -65,7 +65,7 @@ declare_features! (
/// Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
(accepted, async_await, "1.39.0", Some(50547), None),
/// Allows async functions to be declared, implemented, and used in traits.
(accepted, async_fn_in_trait, "CURRENT_RUSTC_VERSION", Some(91611), None),
(accepted, async_fn_in_trait, "1.75.0", Some(91611), None),
/// Allows all literals in attribute lists and values of key-value pairs.
(accepted, attr_literals, "1.30.0", Some(34981), None),
/// Allows overloading augmented assignment operations like `a += b`.
@ -306,7 +306,7 @@ declare_features! (
/// Allows `#[repr(transparent)]` attribute on newtype structs.
(accepted, repr_transparent, "1.28.0", Some(43036), None),
/// Allows return-position `impl Trait` in traits.
(accepted, return_position_impl_trait_in_trait, "CURRENT_RUSTC_VERSION", Some(91611), None),
(accepted, return_position_impl_trait_in_trait, "1.75.0", Some(91611), None),
/// Allows code like `let x: &'static u32 = &42` to work (RFC 1414).
(accepted, rvalue_static_promotion, "1.21.0", Some(38865), None),
/// Allows `Self` in type definitions (RFC 2300).

View File

@ -153,7 +153,7 @@ declare_features! (
(removed, panic_implementation, "1.28.0", Some(44489), None,
Some("subsumed by `#[panic_handler]`")),
/// Allows using `#![plugin(myplugin)]`.
(removed, plugin, "CURRENT_RUSTC_VERSION", Some(29597), None,
(removed, plugin, "1.75.0", Some(29597), None,
Some("plugins are no longer supported")),
/// Allows using `#[plugin_registrar]` on functions.
(removed, plugin_registrar, "1.54.0", Some(29597), None,

View File

@ -457,7 +457,7 @@ declare_features! (
/// Allows using `#[repr(align(...))]` on function items
(unstable, fn_align, "1.53.0", Some(82232), None),
/// Allows defining gen blocks and `gen fn`.
(unstable, gen_blocks, "CURRENT_RUSTC_VERSION", Some(117078), None),
(unstable, gen_blocks, "1.75.0", Some(117078), None),
/// Infer generic args for both consts and types.
(unstable, generic_arg_infer, "1.55.0", Some(85077), None),
/// An extension to the `generic_associated_types` feature, allowing incomplete features.
@ -527,7 +527,7 @@ declare_features! (
/// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden.
(unstable, object_safe_for_dispatch, "1.40.0", Some(43561), None),
/// Allows using enums in offset_of!
(unstable, offset_of_enum, "CURRENT_RUSTC_VERSION", Some(106655), None),
(unstable, offset_of_enum, "1.75.0", Some(106655), None),
/// Allows using `#[optimize(X)]`.
(unstable, optimize_attribute, "1.34.0", Some(54882), None),
/// Allows exhaustive integer pattern matching on `usize` and `isize`.

View File

@ -106,7 +106,7 @@ impl<I: Iterator<Item = u16>> Iterator for DecodeUtf16<I> {
}
}
#[stable(feature = "decode_utf16_fused_iterator", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "decode_utf16_fused_iterator", since = "1.75.0")]
impl<I: Iterator<Item = u16> + FusedIterator> FusedIterator for DecodeUtf16<I> {}
impl DecodeUtf16Error {

View File

@ -1072,7 +1072,7 @@ extern "rust-intrinsic" {
/// zero-initialization: This will statically either panic, or do nothing.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_const_stable(feature = "const_assert_type2", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_assert_type2", since = "1.75.0")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn assert_zero_valid<T>();
@ -1080,7 +1080,7 @@ extern "rust-intrinsic" {
/// A guard for `std::mem::uninitialized`. This will statically either panic, or do nothing.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_const_stable(feature = "const_assert_type2", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_assert_type2", since = "1.75.0")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn assert_mem_uninitialized_valid<T>();
@ -2279,7 +2279,7 @@ extern "rust-intrinsic" {
/// any safety invariants.
///
/// The stabilized version of this intrinsic is [`core::mem::discriminant`].
#[rustc_const_stable(feature = "const_discriminant", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_discriminant", since = "1.75.0")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;

View File

@ -398,7 +398,7 @@ impl<T> MaybeUninit<T> {
#[rustc_allow_const_fn_unstable(const_mut_refs)]
#[rustc_allow_const_fn_unstable(const_ptr_write)]
#[rustc_allow_const_fn_unstable(const_maybe_uninit_as_mut_ptr)]
#[rustc_const_stable(feature = "const_maybe_uninit_zeroed", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_maybe_uninit_zeroed", since = "1.75.0")]
pub const fn zeroed() -> MaybeUninit<T> {
let mut u = MaybeUninit::<T>::uninit();
// SAFETY: `u.as_mut_ptr()` points to allocated memory.
@ -693,7 +693,7 @@ impl<T> MaybeUninit<T> {
#[stable(feature = "maybe_uninit_extra", since = "1.60.0")]
#[rustc_const_stable(
feature = "const_maybe_uninit_assume_init_read",
since = "CURRENT_RUSTC_VERSION"
since = "1.75.0"
)]
#[inline(always)]
#[track_caller]

View File

@ -647,7 +647,7 @@ pub const fn needs_drop<T: ?Sized>() -> bool {
#[allow(deprecated)]
#[rustc_diagnostic_item = "mem_zeroed"]
#[track_caller]
#[rustc_const_stable(feature = "const_mem_zeroed", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_mem_zeroed", since = "1.75.0")]
pub const unsafe fn zeroed<T>() -> T {
// SAFETY: the caller must guarantee that an all-zero value is valid for `T`.
unsafe {
@ -1208,7 +1208,7 @@ impl<T> fmt::Debug for Discriminant<T> {
/// // assert_eq!(0, unsafe { std::mem::transmute::<_, u8>(std::mem::discriminant(&unit_like)) });
/// ```
#[stable(feature = "discriminant_value", since = "1.21.0")]
#[rustc_const_stable(feature = "const_discriminant", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_discriminant", since = "1.75.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "mem_discriminant")]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const fn discriminant<T>(v: &T) -> Discriminant<T> {

View File

@ -425,8 +425,8 @@ impl IpAddr {
#[inline]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[stable(feature = "ip_to_canonical", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ip_to_canonical", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_to_canonical", since = "1.75.0")]
#[rustc_const_stable(feature = "ip_to_canonical", since = "1.75.0")]
pub const fn to_canonical(&self) -> IpAddr {
match self {
IpAddr::V4(_) => *self,
@ -1757,7 +1757,7 @@ impl Ipv6Addr {
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[stable(feature = "ipv6_to_ipv4_mapped", since = "1.63.0")]
#[rustc_const_stable(feature = "const_ipv6_to_ipv4_mapped", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_ipv6_to_ipv4_mapped", since = "1.75.0")]
pub const fn to_ipv4_mapped(&self) -> Option<Ipv4Addr> {
match self.octets() {
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, a, b, c, d] => {
@ -1825,8 +1825,8 @@ impl Ipv6Addr {
#[inline]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[stable(feature = "ip_to_canonical", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "ip_to_canonical", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_to_canonical", since = "1.75.0")]
#[rustc_const_stable(feature = "ip_to_canonical", since = "1.75.0")]
pub const fn to_canonical(&self) -> IpAddr {
if let Some(mapped) = self.to_ipv4_mapped() {
return IpAddr::V4(mapped);
@ -2128,7 +2128,7 @@ impl From<[u16; 8]> for IpAddr {
}
}
#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bitops", since = "1.75.0")]
impl Not for Ipv4Addr {
type Output = Ipv4Addr;
@ -2141,7 +2141,7 @@ impl Not for Ipv4Addr {
}
}
#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bitops", since = "1.75.0")]
impl Not for &'_ Ipv4Addr {
type Output = Ipv4Addr;
@ -2151,7 +2151,7 @@ impl Not for &'_ Ipv4Addr {
}
}
#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bitops", since = "1.75.0")]
impl Not for Ipv6Addr {
type Output = Ipv6Addr;
@ -2164,7 +2164,7 @@ impl Not for Ipv6Addr {
}
}
#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bitops", since = "1.75.0")]
impl Not for &'_ Ipv6Addr {
type Output = Ipv6Addr;
@ -2246,13 +2246,13 @@ macro_rules! bitop_impls {
}
bitop_impls! {
#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bitops", since = "1.75.0")]
impl (BitAnd, BitAndAssign) for Ipv4Addr = (bitand, bitand_assign);
#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bitops", since = "1.75.0")]
impl (BitOr, BitOrAssign) for Ipv4Addr = (bitor, bitor_assign);
#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bitops", since = "1.75.0")]
impl (BitAnd, BitAndAssign) for Ipv6Addr = (bitand, bitand_assign);
#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ip_bitops", since = "1.75.0")]
impl (BitOr, BitOrAssign) for Ipv6Addr = (bitor, bitor_assign);
}

View File

@ -765,7 +765,7 @@ impl<T> Option<T> {
/// ```
#[inline]
#[must_use]
#[stable(feature = "option_as_slice", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "option_as_slice", since = "1.75.0")]
pub fn as_slice(&self) -> &[T] {
// SAFETY: When the `Option` is `Some`, we're using the actual pointer
// to the payload, with a length of 1, so this is equivalent to
@ -819,7 +819,7 @@ impl<T> Option<T> {
/// ```
#[inline]
#[must_use]
#[stable(feature = "option_as_slice", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "option_as_slice", since = "1.75.0")]
pub fn as_mut_slice(&mut self) -> &mut [T] {
// SAFETY: When the `Option` is `Some`, we're using the actual pointer
// to the payload, with a length of 1, so this is equivalent to

View File

@ -480,8 +480,8 @@ impl<T: ?Sized> *const T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn byte_offset(self, count: isize) -> Self {
@ -561,8 +561,8 @@ impl<T: ?Sized> *const T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
pub const fn wrapping_byte_offset(self, count: isize) -> Self {
self.cast::<u8>().wrapping_offset(count).with_metadata_of(self)
@ -728,8 +728,8 @@ impl<T: ?Sized> *const T {
/// For non-`Sized` pointees this operation considers only the data pointers,
/// ignoring the metadata.
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn byte_offset_from<U: ?Sized>(self, origin: *const U) -> isize {
@ -955,8 +955,8 @@ impl<T: ?Sized> *const T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn byte_add(self, count: usize) -> Self {
@ -1049,8 +1049,8 @@ impl<T: ?Sized> *const T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn byte_sub(self, count: usize) -> Self {
@ -1130,8 +1130,8 @@ impl<T: ?Sized> *const T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
pub const fn wrapping_byte_add(self, count: usize) -> Self {
self.cast::<u8>().wrapping_add(count).with_metadata_of(self)
@ -1209,8 +1209,8 @@ impl<T: ?Sized> *const T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
pub const fn wrapping_byte_sub(self, count: usize) -> Self {
self.cast::<u8>().wrapping_sub(count).with_metadata_of(self)

View File

@ -495,8 +495,8 @@ impl<T: ?Sized> *mut T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn byte_offset(self, count: isize) -> Self {
@ -575,8 +575,8 @@ impl<T: ?Sized> *mut T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
pub const fn wrapping_byte_offset(self, count: isize) -> Self {
self.cast::<u8>().wrapping_offset(count).with_metadata_of(self)
@ -900,8 +900,8 @@ impl<T: ?Sized> *mut T {
/// For non-`Sized` pointees this operation considers only the data pointers,
/// ignoring the metadata.
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn byte_offset_from<U: ?Sized>(self, origin: *const U) -> isize {
@ -1056,8 +1056,8 @@ impl<T: ?Sized> *mut T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn byte_add(self, count: usize) -> Self {
@ -1150,8 +1150,8 @@ impl<T: ?Sized> *mut T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn byte_sub(self, count: usize) -> Self {
@ -1231,8 +1231,8 @@ impl<T: ?Sized> *mut T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
pub const fn wrapping_byte_add(self, count: usize) -> Self {
self.cast::<u8>().wrapping_add(count).with_metadata_of(self)
@ -1310,8 +1310,8 @@ impl<T: ?Sized> *mut T {
/// leaving the metadata untouched.
#[must_use]
#[inline(always)]
#[stable(feature = "pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "pointer_byte_offsets", since = "1.75.0")]
#[rustc_const_stable(feature = "const_pointer_byte_offsets", since = "1.75.0")]
#[rustc_allow_const_fn_unstable(set_ptr_value)]
pub const fn wrapping_byte_sub(self, count: usize) -> Self {
self.cast::<u8>().wrapping_sub(count).with_metadata_of(self)

View File

@ -444,7 +444,7 @@ impl AtomicBool {
///
/// [valid]: crate::ptr#safety
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
#[stable(feature = "atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
#[rustc_const_unstable(feature = "const_atomic_from_ptr", issue = "108652")]
pub const unsafe fn from_ptr<'a>(ptr: *mut bool) -> &'a AtomicBool {
// SAFETY: guaranteed by the caller
@ -1242,7 +1242,7 @@ impl<T> AtomicPtr<T> {
///
/// [valid]: crate::ptr#safety
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
#[stable(feature = "atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
#[rustc_const_unstable(feature = "const_atomic_from_ptr", issue = "108652")]
pub const unsafe fn from_ptr<'a>(ptr: *mut *mut T) -> &'a AtomicPtr<T> {
// SAFETY: guaranteed by the caller
@ -2218,7 +2218,7 @@ macro_rules! atomic_int {
///
/// [valid]: crate::ptr#safety
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
#[stable(feature = "atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
#[rustc_const_unstable(feature = "const_atomic_from_ptr", issue = "108652")]
pub const unsafe fn from_ptr<'a>(ptr: *mut $int_type) -> &'a $atomic_type {
// SAFETY: guaranteed by the caller

View File

@ -189,7 +189,7 @@ pub struct OpenOptions(fs_imp::OpenOptions);
/// Representation of the various timestamps on a file.
#[derive(Copy, Clone, Debug, Default)]
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
pub struct FileTimes(fs_imp::FileTimes);
/// Representation of the various permissions on a file.
@ -688,7 +688,7 @@ impl File {
/// Ok(())
/// }
/// ```
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
#[doc(alias = "futimens")]
#[doc(alias = "futimes")]
#[doc(alias = "SetFileTime")]
@ -699,7 +699,7 @@ impl File {
/// Changes the modification time of the underlying file.
///
/// This is an alias for `set_times(FileTimes::new().set_modified(time))`.
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
#[inline]
pub fn set_modified(&self, time: SystemTime) -> io::Result<()> {
self.set_times(FileTimes::new().set_modified(time))
@ -1413,20 +1413,20 @@ impl FileTimes {
/// Create a new `FileTimes` with no times set.
///
/// Using the resulting `FileTimes` in [`File::set_times`] will not modify any timestamps.
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
pub fn new() -> Self {
Self::default()
}
/// Set the last access time of a file.
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
pub fn set_accessed(mut self, t: SystemTime) -> Self {
self.0.set_accessed(t.into_inner());
self
}
/// Set the last modified time of a file.
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
pub fn set_modified(mut self, t: SystemTime) -> Self {
self.0.set_modified(t.into_inner());
self
@ -1440,7 +1440,7 @@ impl AsInnerMut<fs_imp::FileTimes> for FileTimes {
}
// For implementing OS extension traits in `std::os`
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
impl Sealed for FileTimes {}
impl Permissions {

View File

@ -476,7 +476,7 @@ impl<A: Allocator> Read for VecDeque<u8, A> {
}
/// BufRead is implemented for `VecDeque<u8>` by reading bytes from the front of the `VecDeque`.
#[stable(feature = "vecdeque_buf_read", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "vecdeque_buf_read", since = "1.75.0")]
impl<A: Allocator> BufRead for VecDeque<u8, A> {
/// Returns the contents of the "front" slice as returned by
/// [`as_slices`][`VecDeque::as_slices`]. If the contained byte slices of the `VecDeque` are

View File

@ -144,14 +144,14 @@ impl MetadataExt for Metadata {
}
/// OS-specific extensions to [`fs::FileTimes`].
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
pub trait FileTimesExt: Sealed {
/// Set the creation time of a file.
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
fn set_created(self, t: SystemTime) -> Self;
}
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
impl FileTimesExt for fs::FileTimes {
fn set_created(mut self, t: SystemTime) -> Self {
self.as_inner_mut().set_created(t.into_inner());

View File

@ -150,14 +150,14 @@ impl MetadataExt for Metadata {
}
/// OS-specific extensions to [`fs::FileTimes`].
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
pub trait FileTimesExt: Sealed {
/// Set the creation time of a file.
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
fn set_created(self, t: SystemTime) -> Self;
}
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
impl FileTimesExt for fs::FileTimes {
fn set_created(mut self, t: SystemTime) -> Self {
self.as_inner_mut().set_created(t.into_inner());

View File

@ -144,14 +144,14 @@ impl MetadataExt for Metadata {
}
/// OS-specific extensions to [`fs::FileTimes`].
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
pub trait FileTimesExt: Sealed {
/// Set the creation time of a file.
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
fn set_created(self, t: SystemTime) -> Self;
}
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
impl FileTimesExt for fs::FileTimes {
fn set_created(mut self, t: SystemTime) -> Self {
self.as_inner_mut().set_created(t.into_inner());

View File

@ -528,14 +528,14 @@ impl FileTypeExt for fs::FileType {
}
/// Windows-specific extensions to [`fs::FileTimes`].
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
pub trait FileTimesExt: Sealed {
/// Set the creation time of a file.
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
fn set_created(self, t: SystemTime) -> Self;
}
#[stable(feature = "file_set_times", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "file_set_times", since = "1.75.0")]
impl FileTimesExt for fs::FileTimes {
fn set_created(mut self, t: SystemTime) -> Self {
self.as_inner_mut().set_created(t.into_inner());

View File

@ -1961,7 +1961,7 @@ impl ExitCode {
}
/// The default value is [`ExitCode::SUCCESS`]
#[stable(feature = "process_exitcode_default", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "process_exitcode_default", since = "1.75.0")]
impl Default for ExitCode {
fn default() -> Self {
ExitCode::SUCCESS