Skip to content

[beta] 1.75.0 promotion #117842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/char/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,15 +1072,15 @@ 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>();

/// 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>();
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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> {
Expand Down
26 changes: 13 additions & 13 deletions library/core/src/net/ip_addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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] => {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand Down Expand Up @@ -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);
}
4 changes: 2 additions & 2 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Loading