Auto merge of #133447 - BoxyUwU:beta, r=BoxyUwU
[beta] Prepare Rust 1.84.0 r? `@ghost`
This commit is contained in:
commit
b4297a573b
35 changed files with 111 additions and 179 deletions
|
@ -225,7 +225,7 @@ declare_features! (
|
||||||
/// Allows the use of `if let` expressions.
|
/// Allows the use of `if let` expressions.
|
||||||
(accepted, if_let, "1.0.0", None),
|
(accepted, if_let, "1.0.0", None),
|
||||||
/// Rescoping temporaries in `if let` to align with Rust 2024.
|
/// Rescoping temporaries in `if let` to align with Rust 2024.
|
||||||
(accepted, if_let_rescope, "CURRENT_RUSTC_VERSION", Some(124085)),
|
(accepted, if_let_rescope, "1.84.0", Some(124085)),
|
||||||
/// Allows top level or-patterns (`p | q`) in `if let` and `while let`.
|
/// Allows top level or-patterns (`p | q`) in `if let` and `while let`.
|
||||||
(accepted, if_while_or_patterns, "1.33.0", Some(48215)),
|
(accepted, if_while_or_patterns, "1.33.0", Some(48215)),
|
||||||
/// Allows lifetime elision in `impl` headers. For example:
|
/// Allows lifetime elision in `impl` headers. For example:
|
||||||
|
@ -357,7 +357,7 @@ declare_features! (
|
||||||
(accepted, repr_transparent, "1.28.0", Some(43036)),
|
(accepted, repr_transparent, "1.28.0", Some(43036)),
|
||||||
/// Allows enums like Result<T, E> to be used across FFI, if T's niche value can
|
/// Allows enums like Result<T, E> to be used across FFI, if T's niche value can
|
||||||
/// be used to describe E or vice-versa.
|
/// be used to describe E or vice-versa.
|
||||||
(accepted, result_ffi_guarantees, "CURRENT_RUSTC_VERSION", Some(110503)),
|
(accepted, result_ffi_guarantees, "1.84.0", Some(110503)),
|
||||||
/// Allows return-position `impl Trait` in traits.
|
/// Allows return-position `impl Trait` in traits.
|
||||||
(accepted, return_position_impl_trait_in_trait, "1.75.0", Some(91611)),
|
(accepted, return_position_impl_trait_in_trait, "1.75.0", Some(91611)),
|
||||||
/// Allows code like `let x: &'static u32 = &42` to work (RFC 1414).
|
/// Allows code like `let x: &'static u32 = &42` to work (RFC 1414).
|
||||||
|
@ -367,7 +367,7 @@ declare_features! (
|
||||||
/// Allows `Self` struct constructor (RFC 2302).
|
/// Allows `Self` struct constructor (RFC 2302).
|
||||||
(accepted, self_struct_ctor, "1.32.0", Some(51994)),
|
(accepted, self_struct_ctor, "1.32.0", Some(51994)),
|
||||||
/// Shortern the tail expression lifetime
|
/// Shortern the tail expression lifetime
|
||||||
(accepted, shorter_tail_lifetimes, "CURRENT_RUSTC_VERSION", Some(123739)),
|
(accepted, shorter_tail_lifetimes, "1.84.0", Some(123739)),
|
||||||
/// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`.
|
/// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`.
|
||||||
(accepted, slice_patterns, "1.42.0", Some(62254)),
|
(accepted, slice_patterns, "1.42.0", Some(62254)),
|
||||||
/// Allows use of `&foo[a..b]` as a slicing syntax.
|
/// Allows use of `&foo[a..b]` as a slicing syntax.
|
||||||
|
|
|
@ -101,7 +101,7 @@ declare_features! (
|
||||||
/// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238).
|
/// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238).
|
||||||
(removed, dropck_parametricity, "1.38.0", Some(28498), None),
|
(removed, dropck_parametricity, "1.38.0", Some(28498), None),
|
||||||
/// Uses generic effect parameters for ~const bounds
|
/// Uses generic effect parameters for ~const bounds
|
||||||
(removed, effects, "CURRENT_RUSTC_VERSION", Some(102090),
|
(removed, effects, "1.84.0", Some(102090),
|
||||||
Some("removed, redundant with `#![feature(const_trait_impl)]`")),
|
Some("removed, redundant with `#![feature(const_trait_impl)]`")),
|
||||||
/// Allows defining `existential type`s.
|
/// Allows defining `existential type`s.
|
||||||
(removed, existential_type, "1.38.0", Some(63063),
|
(removed, existential_type, "1.38.0", Some(63063),
|
||||||
|
|
|
@ -338,7 +338,7 @@ declare_features! (
|
||||||
(unstable, riscv_target_feature, "1.45.0", Some(44839)),
|
(unstable, riscv_target_feature, "1.45.0", Some(44839)),
|
||||||
(unstable, rtm_target_feature, "1.35.0", Some(44839)),
|
(unstable, rtm_target_feature, "1.35.0", Some(44839)),
|
||||||
(unstable, s390x_target_feature, "1.82.0", Some(44839)),
|
(unstable, s390x_target_feature, "1.82.0", Some(44839)),
|
||||||
(unstable, sparc_target_feature, "CURRENT_RUSTC_VERSION", Some(132783)),
|
(unstable, sparc_target_feature, "1.84.0", Some(132783)),
|
||||||
(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)),
|
||||||
|
@ -532,7 +532,7 @@ declare_features! (
|
||||||
/// Allows `#[marker]` on certain traits allowing overlapping implementations.
|
/// Allows `#[marker]` on certain traits allowing overlapping implementations.
|
||||||
(unstable, marker_trait_attr, "1.30.0", Some(29864)),
|
(unstable, marker_trait_attr, "1.30.0", Some(29864)),
|
||||||
/// Enables the generic const args MVP (only bare paths, not arbitrary computation).
|
/// Enables the generic const args MVP (only bare paths, not arbitrary computation).
|
||||||
(incomplete, min_generic_const_args, "CURRENT_RUSTC_VERSION", Some(132980)),
|
(incomplete, min_generic_const_args, "1.84.0", Some(132980)),
|
||||||
/// A minimal, sound subset of specialization intended to be used by the
|
/// A minimal, sound subset of specialization intended to be used by the
|
||||||
/// standard library until the soundness issues with specialization
|
/// standard library until the soundness issues with specialization
|
||||||
/// are fixed.
|
/// are fixed.
|
||||||
|
|
|
@ -110,7 +110,7 @@ impl<T: Clone> From<&[T]> for Box<[T]> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "box_from_mut_slice", since = "1.84.0")]
|
||||||
impl<T: Clone> From<&mut [T]> for Box<[T]> {
|
impl<T: Clone> From<&mut [T]> for Box<[T]> {
|
||||||
/// Converts a `&mut [T]` into a `Box<[T]>`
|
/// Converts a `&mut [T]` into a `Box<[T]>`
|
||||||
///
|
///
|
||||||
|
@ -171,7 +171,7 @@ impl From<&str> for Box<str> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "box_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut str> for Box<str> {
|
impl From<&mut str> for Box<str> {
|
||||||
/// Converts a `&mut str` into a `Box<str>`
|
/// Converts a `&mut str` into a `Box<str>`
|
||||||
///
|
///
|
||||||
|
|
|
@ -773,7 +773,7 @@ impl From<&CStr> for Box<CStr> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "box_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut CStr> for Box<CStr> {
|
impl From<&mut CStr> for Box<CStr> {
|
||||||
/// Converts a `&mut CStr` into a `Box<CStr>`,
|
/// Converts a `&mut CStr` into a `Box<CStr>`,
|
||||||
/// by copying the contents into a newly allocated [`Box`].
|
/// by copying the contents into a newly allocated [`Box`].
|
||||||
|
@ -921,7 +921,7 @@ impl From<&CStr> for Arc<CStr> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_has_atomic = "ptr")]
|
#[cfg(target_has_atomic = "ptr")]
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut CStr> for Arc<CStr> {
|
impl From<&mut CStr> for Arc<CStr> {
|
||||||
/// Converts a `&mut CStr` into a `Arc<CStr>`,
|
/// Converts a `&mut CStr` into a `Arc<CStr>`,
|
||||||
/// by copying the contents into a newly allocated [`Arc`].
|
/// by copying the contents into a newly allocated [`Arc`].
|
||||||
|
@ -953,7 +953,7 @@ impl From<&CStr> for Rc<CStr> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut CStr> for Rc<CStr> {
|
impl From<&mut CStr> for Rc<CStr> {
|
||||||
/// Converts a `&mut CStr` into a `Rc<CStr>`,
|
/// Converts a `&mut CStr` into a `Rc<CStr>`,
|
||||||
/// by copying the contents into a newly allocated [`Rc`].
|
/// by copying the contents into a newly allocated [`Rc`].
|
||||||
|
|
|
@ -2659,7 +2659,7 @@ impl<T: Clone> From<&[T]> for Rc<[T]> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl<T: Clone> From<&mut [T]> for Rc<[T]> {
|
impl<T: Clone> From<&mut [T]> for Rc<[T]> {
|
||||||
/// Allocates a reference-counted slice and fills it by cloning `v`'s items.
|
/// Allocates a reference-counted slice and fills it by cloning `v`'s items.
|
||||||
///
|
///
|
||||||
|
@ -2698,7 +2698,7 @@ impl From<&str> for Rc<str> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut str> for Rc<str> {
|
impl From<&mut str> for Rc<str> {
|
||||||
/// Allocates a reference-counted string slice and copies `v` into it.
|
/// Allocates a reference-counted string slice and copies `v` into it.
|
||||||
///
|
///
|
||||||
|
|
|
@ -3618,7 +3618,7 @@ impl<T: Clone> From<&[T]> for Arc<[T]> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl<T: Clone> From<&mut [T]> for Arc<[T]> {
|
impl<T: Clone> From<&mut [T]> for Arc<[T]> {
|
||||||
/// Allocates a reference-counted slice and fills it by cloning `v`'s items.
|
/// Allocates a reference-counted slice and fills it by cloning `v`'s items.
|
||||||
///
|
///
|
||||||
|
@ -3657,7 +3657,7 @@ impl From<&str> for Arc<str> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut str> for Arc<str> {
|
impl From<&mut str> for Arc<str> {
|
||||||
/// Allocates a reference-counted `str` and copies `v` into it.
|
/// Allocates a reference-counted `str` and copies `v` into it.
|
||||||
///
|
///
|
||||||
|
|
|
@ -2133,8 +2133,8 @@ impl<T: ?Sized> UnsafeCell<T> {
|
||||||
/// assert_eq!(*uc.get_mut(), 41);
|
/// assert_eq!(*uc.get_mut(), 41);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "unsafe_cell_from_mut", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "unsafe_cell_from_mut", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "unsafe_cell_from_mut", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "unsafe_cell_from_mut", since = "1.84.0")]
|
||||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
|
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
|
||||||
pub const fn from_mut(value: &mut T) -> &mut UnsafeCell<T> {
|
pub const fn from_mut(value: &mut T) -> &mut UnsafeCell<T> {
|
||||||
// SAFETY: `UnsafeCell<T>` has the same memory layout as `T` due to #[repr(transparent)].
|
// SAFETY: `UnsafeCell<T>` has the same memory layout as `T` due to #[repr(transparent)].
|
||||||
|
|
|
@ -729,7 +729,7 @@ impl char {
|
||||||
/// '𝕊'.encode_utf16(&mut b);
|
/// '𝕊'.encode_utf16(&mut b);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
|
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
|
||||||
#[rustc_const_stable(feature = "const_char_encode_utf16", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_char_encode_utf16", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] {
|
pub const fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] {
|
||||||
encode_utf16_raw(self as u32, dst)
|
encode_utf16_raw(self as u32, dst)
|
||||||
|
@ -1299,7 +1299,7 @@ impl char {
|
||||||
///
|
///
|
||||||
/// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
|
/// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
|
||||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||||
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn make_ascii_uppercase(&mut self) {
|
pub const fn make_ascii_uppercase(&mut self) {
|
||||||
*self = self.to_ascii_uppercase();
|
*self = self.to_ascii_uppercase();
|
||||||
|
@ -1325,7 +1325,7 @@ impl char {
|
||||||
///
|
///
|
||||||
/// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
|
/// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
|
||||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||||
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn make_ascii_lowercase(&mut self) {
|
pub const fn make_ascii_lowercase(&mut self) {
|
||||||
*self = self.to_ascii_lowercase();
|
*self = self.to_ascii_lowercase();
|
||||||
|
@ -1838,7 +1838,7 @@ pub const fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> &mut [u8] {
|
||||||
#[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
|
#[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
bootstrap,
|
bootstrap,
|
||||||
rustc_const_stable(feature = "const_char_encode_utf16", since = "CURRENT_RUSTC_VERSION")
|
rustc_const_stable(feature = "const_char_encode_utf16", since = "1.84.0")
|
||||||
)]
|
)]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -438,7 +438,7 @@ impl<'a> Arguments<'a> {
|
||||||
/// assert_eq!(format_args!("{:?}", std::env::current_dir()).as_str(), None);
|
/// assert_eq!(format_args!("{:?}", std::env::current_dir()).as_str(), None);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "fmt_as_str", since = "1.52.0")]
|
#[stable(feature = "fmt_as_str", since = "1.52.0")]
|
||||||
#[rustc_const_stable(feature = "const_arguments_as_str", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_arguments_as_str", since = "1.84.0")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn as_str(&self) -> Option<&'static str> {
|
pub const fn as_str(&self) -> Option<&'static str> {
|
||||||
|
|
|
@ -1494,7 +1494,7 @@ pub const fn cold_path() {}
|
||||||
/// This intrinsic does not have a stable counterpart.
|
/// This intrinsic does not have a stable counterpart.
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
bootstrap,
|
bootstrap,
|
||||||
rustc_const_stable(feature = "const_likely", since = "CURRENT_RUSTC_VERSION")
|
rustc_const_stable(feature = "const_likely", since = "1.84.0")
|
||||||
)]
|
)]
|
||||||
#[unstable(feature = "core_intrinsics", issue = "none")]
|
#[unstable(feature = "core_intrinsics", issue = "none")]
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
|
@ -1526,7 +1526,7 @@ pub const fn likely(b: bool) -> bool {
|
||||||
/// This intrinsic does not have a stable counterpart.
|
/// This intrinsic does not have a stable counterpart.
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
bootstrap,
|
bootstrap,
|
||||||
rustc_const_stable(feature = "const_likely", since = "CURRENT_RUSTC_VERSION")
|
rustc_const_stable(feature = "const_likely", since = "1.84.0")
|
||||||
)]
|
)]
|
||||||
#[unstable(feature = "core_intrinsics", issue = "none")]
|
#[unstable(feature = "core_intrinsics", issue = "none")]
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
|
@ -3629,7 +3629,7 @@ pub(crate) macro const_eval_select {
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
bootstrap,
|
bootstrap,
|
||||||
rustc_const_stable(feature = "const_is_val_statically_known", since = "CURRENT_RUSTC_VERSION")
|
rustc_const_stable(feature = "const_is_val_statically_known", since = "1.84.0")
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
|
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
|
|
|
@ -909,7 +909,7 @@ impl<T> MaybeUninit<T> {
|
||||||
#[stable(feature = "maybe_uninit_ref", since = "1.55.0")]
|
#[stable(feature = "maybe_uninit_ref", since = "1.55.0")]
|
||||||
#[rustc_const_stable(
|
#[rustc_const_stable(
|
||||||
feature = "const_maybe_uninit_assume_init",
|
feature = "const_maybe_uninit_assume_init",
|
||||||
since = "CURRENT_RUSTC_VERSION"
|
since = "1.84.0"
|
||||||
)]
|
)]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub const unsafe fn assume_init_mut(&mut self) -> &mut T {
|
pub const unsafe fn assume_init_mut(&mut self) -> &mut T {
|
||||||
|
|
|
@ -1601,8 +1601,8 @@ impl Ipv6Addr {
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "ipv6_is_unique_local", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "ipv6_is_unique_local", since = "1.84.0")]
|
||||||
pub const fn is_unique_local(&self) -> bool {
|
pub const fn is_unique_local(&self) -> bool {
|
||||||
(self.segments()[0] & 0xfe00) == 0xfc00
|
(self.segments()[0] & 0xfe00) == 0xfc00
|
||||||
}
|
}
|
||||||
|
@ -1679,8 +1679,8 @@ impl Ipv6Addr {
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "ipv6_is_unique_local", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "ipv6_is_unique_local", since = "1.84.0")]
|
||||||
pub const fn is_unicast_link_local(&self) -> bool {
|
pub const fn is_unicast_link_local(&self) -> bool {
|
||||||
(self.segments()[0] & 0xffc0) == 0xfe80
|
(self.segments()[0] & 0xffc0) == 0xfe80
|
||||||
}
|
}
|
||||||
|
|
|
@ -1613,8 +1613,8 @@ macro_rules! int_impl {
|
||||||
/// ```
|
/// ```
|
||||||
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".checked_isqrt(), Some(3));")]
|
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".checked_isqrt(), Some(3));")]
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "isqrt", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "isqrt", since = "1.84.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]
|
||||||
|
@ -2859,8 +2859,8 @@ macro_rules! int_impl {
|
||||||
/// ```
|
/// ```
|
||||||
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
|
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "isqrt", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "isqrt", since = "1.84.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]
|
||||||
|
|
|
@ -677,7 +677,7 @@ impl u8 {
|
||||||
///
|
///
|
||||||
/// [`to_ascii_uppercase`]: Self::to_ascii_uppercase
|
/// [`to_ascii_uppercase`]: Self::to_ascii_uppercase
|
||||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||||
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn make_ascii_uppercase(&mut self) {
|
pub const fn make_ascii_uppercase(&mut self) {
|
||||||
*self = self.to_ascii_uppercase();
|
*self = self.to_ascii_uppercase();
|
||||||
|
@ -703,7 +703,7 @@ impl u8 {
|
||||||
///
|
///
|
||||||
/// [`to_ascii_lowercase`]: Self::to_ascii_lowercase
|
/// [`to_ascii_lowercase`]: Self::to_ascii_lowercase
|
||||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||||
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn make_ascii_lowercase(&mut self) {
|
pub const fn make_ascii_lowercase(&mut self) {
|
||||||
*self = self.to_ascii_lowercase();
|
*self = self.to_ascii_lowercase();
|
||||||
|
|
|
@ -139,9 +139,9 @@ impl_nonzero_fmt! {
|
||||||
LowerHex
|
LowerHex
|
||||||
#[stable(feature = "nonzero", since = "1.28.0")]
|
#[stable(feature = "nonzero", since = "1.28.0")]
|
||||||
UpperHex
|
UpperHex
|
||||||
#[stable(feature = "nonzero_fmt_exp", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "nonzero_fmt_exp", since = "1.84.0")]
|
||||||
LowerExp
|
LowerExp
|
||||||
#[stable(feature = "nonzero_fmt_exp", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "nonzero_fmt_exp", since = "1.84.0")]
|
||||||
UpperExp
|
UpperExp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1587,8 +1587,8 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
|
||||||
/// # Some(())
|
/// # Some(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "isqrt", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "isqrt", since = "1.84.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]
|
||||||
|
|
|
@ -2838,8 +2838,8 @@ macro_rules! uint_impl {
|
||||||
/// ```
|
/// ```
|
||||||
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
|
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "isqrt", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "isqrt", since = "1.84.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]
|
||||||
|
|
|
@ -738,7 +738,7 @@ impl<T> Option<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
#[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_option_ext", since = "1.84.0")]
|
||||||
pub const fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&T>> {
|
pub const fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&T>> {
|
||||||
// FIXME(const-hack): use `map` once that is possible
|
// FIXME(const-hack): use `map` once that is possible
|
||||||
match Pin::get_ref(self).as_ref() {
|
match Pin::get_ref(self).as_ref() {
|
||||||
|
@ -755,7 +755,7 @@ impl<T> Option<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
#[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_option_ext", since = "1.84.0")]
|
||||||
pub const fn as_pin_mut(self: Pin<&mut Self>) -> Option<Pin<&mut T>> {
|
pub const fn as_pin_mut(self: Pin<&mut Self>) -> Option<Pin<&mut T>> {
|
||||||
// SAFETY: `get_unchecked_mut` is never used to move the `Option` inside `self`.
|
// SAFETY: `get_unchecked_mut` is never used to move the `Option` inside `self`.
|
||||||
// `x` is guaranteed to be pinned because it comes from `self` which is pinned.
|
// `x` is guaranteed to be pinned because it comes from `self` which is pinned.
|
||||||
|
@ -802,7 +802,7 @@ impl<T> Option<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "option_as_slice", since = "1.75.0")]
|
#[stable(feature = "option_as_slice", since = "1.75.0")]
|
||||||
#[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_option_ext", since = "1.84.0")]
|
||||||
pub const fn as_slice(&self) -> &[T] {
|
pub const fn as_slice(&self) -> &[T] {
|
||||||
// SAFETY: When the `Option` is `Some`, we're using the actual pointer
|
// 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
|
// to the payload, with a length of 1, so this is equivalent to
|
||||||
|
@ -857,7 +857,7 @@ impl<T> Option<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "option_as_slice", since = "1.75.0")]
|
#[stable(feature = "option_as_slice", since = "1.75.0")]
|
||||||
#[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_option_ext", since = "1.84.0")]
|
||||||
pub const fn as_mut_slice(&mut self) -> &mut [T] {
|
pub const fn as_mut_slice(&mut self) -> &mut [T] {
|
||||||
// SAFETY: When the `Option` is `Some`, we're using the actual pointer
|
// 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
|
// to the payload, with a length of 1, so this is equivalent to
|
||||||
|
|
|
@ -208,7 +208,7 @@ pub macro const_panic {
|
||||||
#[rustc_allow_const_fn_unstable(const_eval_select)]
|
#[rustc_allow_const_fn_unstable(const_eval_select)]
|
||||||
#[inline(always)] // inline the wrapper
|
#[inline(always)] // inline the wrapper
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
#[cfg_attr(bootstrap, rustc_const_stable(feature = "const_panic", since = "CURRENT_RUSTC_VERSION"))]
|
#[cfg_attr(bootstrap, rustc_const_stable(feature = "const_panic", since = "1.84.0"))]
|
||||||
const fn do_panic($($arg: $ty),*) -> ! {
|
const fn do_panic($($arg: $ty),*) -> ! {
|
||||||
$crate::intrinsics::const_eval_select!(
|
$crate::intrinsics::const_eval_select!(
|
||||||
@capture { $($arg: $ty = $arg),* } -> !:
|
@capture { $($arg: $ty = $arg),* } -> !:
|
||||||
|
|
|
@ -165,7 +165,7 @@ impl<'a> PanicMessage<'a> {
|
||||||
///
|
///
|
||||||
/// See [`fmt::Arguments::as_str`] for details.
|
/// See [`fmt::Arguments::as_str`] for details.
|
||||||
#[stable(feature = "panic_info_message", since = "1.81.0")]
|
#[stable(feature = "panic_info_message", since = "1.81.0")]
|
||||||
#[rustc_const_stable(feature = "const_arguments_as_str", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_arguments_as_str", since = "1.84.0")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn as_str(&self) -> Option<&'static str> {
|
pub const fn as_str(&self) -> Option<&'static str> {
|
||||||
|
|
|
@ -1186,7 +1186,7 @@ impl<Ptr: Deref<Target: Unpin>> Pin<Ptr> {
|
||||||
/// let mut pinned: Pin<&mut u8> = Pin::new(&mut val);
|
/// let mut pinned: Pin<&mut u8> = Pin::new(&mut val);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
pub const fn new(pointer: Ptr) -> Pin<Ptr> {
|
pub const fn new(pointer: Ptr) -> Pin<Ptr> {
|
||||||
// SAFETY: the value pointed to is `Unpin`, and so has no requirements
|
// SAFETY: the value pointed to is `Unpin`, and so has no requirements
|
||||||
|
@ -1215,7 +1215,7 @@ impl<Ptr: Deref<Target: Unpin>> Pin<Ptr> {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
|
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
#[stable(feature = "pin_into_inner", since = "1.39.0")]
|
#[stable(feature = "pin_into_inner", since = "1.39.0")]
|
||||||
pub const fn into_inner(pin: Pin<Ptr>) -> Ptr {
|
pub const fn into_inner(pin: Pin<Ptr>) -> Ptr {
|
||||||
pin.__pointer
|
pin.__pointer
|
||||||
|
@ -1352,7 +1352,7 @@ impl<Ptr: Deref> Pin<Ptr> {
|
||||||
/// [`pin` module docs]: self
|
/// [`pin` module docs]: self
|
||||||
#[lang = "new_unchecked"]
|
#[lang = "new_unchecked"]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
pub const unsafe fn new_unchecked(pointer: Ptr) -> Pin<Ptr> {
|
pub const unsafe fn new_unchecked(pointer: Ptr) -> Pin<Ptr> {
|
||||||
Pin { __pointer: pointer }
|
Pin { __pointer: pointer }
|
||||||
|
@ -1423,7 +1423,7 @@ impl<Ptr: DerefMut> Pin<Ptr> {
|
||||||
/// move in the future, and this method does not enable the pointee to move. "Malicious"
|
/// move in the future, and this method does not enable the pointee to move. "Malicious"
|
||||||
/// implementations of `Ptr::DerefMut` are likewise ruled out by the contract of
|
/// implementations of `Ptr::DerefMut` are likewise ruled out by the contract of
|
||||||
/// `Pin::new_unchecked`.
|
/// `Pin::new_unchecked`.
|
||||||
#[stable(feature = "pin_deref_mut", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "pin_deref_mut", since = "1.84.0")]
|
||||||
#[must_use = "`self` will be dropped if the result is not used"]
|
#[must_use = "`self` will be dropped if the result is not used"]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn as_deref_mut(self: Pin<&mut Pin<Ptr>>) -> Pin<&mut Ptr::Target> {
|
pub fn as_deref_mut(self: Pin<&mut Pin<Ptr>>) -> Pin<&mut Ptr::Target> {
|
||||||
|
@ -1505,7 +1505,7 @@ impl<Ptr: Deref> Pin<Ptr> {
|
||||||
/// instead.
|
/// instead.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
|
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
#[stable(feature = "pin_into_inner", since = "1.39.0")]
|
#[stable(feature = "pin_into_inner", since = "1.39.0")]
|
||||||
pub const unsafe fn into_inner_unchecked(pin: Pin<Ptr>) -> Ptr {
|
pub const unsafe fn into_inner_unchecked(pin: Pin<Ptr>) -> Ptr {
|
||||||
pin.__pointer
|
pin.__pointer
|
||||||
|
@ -1561,7 +1561,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
|
||||||
/// ["pinning projections"]: self#projections-and-structural-pinning
|
/// ["pinning projections"]: self#projections-and-structural-pinning
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
pub const fn get_ref(self) -> &'a T {
|
pub const fn get_ref(self) -> &'a T {
|
||||||
self.__pointer
|
self.__pointer
|
||||||
|
@ -1572,7 +1572,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
|
||||||
/// Converts this `Pin<&mut T>` into a `Pin<&T>` with the same lifetime.
|
/// Converts this `Pin<&mut T>` into a `Pin<&T>` with the same lifetime.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use = "`self` will be dropped if the result is not used"]
|
#[must_use = "`self` will be dropped if the result is not used"]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
pub const fn into_ref(self) -> Pin<&'a T> {
|
pub const fn into_ref(self) -> Pin<&'a T> {
|
||||||
Pin { __pointer: self.__pointer }
|
Pin { __pointer: self.__pointer }
|
||||||
|
@ -1590,7 +1590,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use = "`self` will be dropped if the result is not used"]
|
#[must_use = "`self` will be dropped if the result is not used"]
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
pub const fn get_mut(self) -> &'a mut T
|
pub const fn get_mut(self) -> &'a mut T
|
||||||
where
|
where
|
||||||
T: Unpin,
|
T: Unpin,
|
||||||
|
@ -1611,7 +1611,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use = "`self` will be dropped if the result is not used"]
|
#[must_use = "`self` will be dropped if the result is not used"]
|
||||||
#[stable(feature = "pin", since = "1.33.0")]
|
#[stable(feature = "pin", since = "1.33.0")]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
pub const unsafe fn get_unchecked_mut(self) -> &'a mut T {
|
pub const unsafe fn get_unchecked_mut(self) -> &'a mut T {
|
||||||
self.__pointer
|
self.__pointer
|
||||||
}
|
}
|
||||||
|
@ -1654,7 +1654,7 @@ impl<T: ?Sized> Pin<&'static T> {
|
||||||
/// This is safe because `T` is borrowed immutably for the `'static` lifetime, which
|
/// This is safe because `T` is borrowed immutably for the `'static` lifetime, which
|
||||||
/// never ends.
|
/// never ends.
|
||||||
#[stable(feature = "pin_static_ref", since = "1.61.0")]
|
#[stable(feature = "pin_static_ref", since = "1.61.0")]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
pub const fn static_ref(r: &'static T) -> Pin<&'static T> {
|
pub const fn static_ref(r: &'static T) -> Pin<&'static T> {
|
||||||
// SAFETY: The 'static borrow guarantees the data will not be
|
// SAFETY: The 'static borrow guarantees the data will not be
|
||||||
// moved/invalidated until it gets dropped (which is never).
|
// moved/invalidated until it gets dropped (which is never).
|
||||||
|
@ -1668,7 +1668,7 @@ impl<T: ?Sized> Pin<&'static mut T> {
|
||||||
/// This is safe because `T` is borrowed for the `'static` lifetime, which
|
/// This is safe because `T` is borrowed for the `'static` lifetime, which
|
||||||
/// never ends.
|
/// never ends.
|
||||||
#[stable(feature = "pin_static_ref", since = "1.61.0")]
|
#[stable(feature = "pin_static_ref", since = "1.61.0")]
|
||||||
#[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_pin", since = "1.84.0")]
|
||||||
pub const fn static_mut(r: &'static mut T) -> Pin<&'static mut T> {
|
pub const fn static_mut(r: &'static mut T) -> Pin<&'static mut T> {
|
||||||
// SAFETY: The 'static borrow guarantees the data will not be
|
// SAFETY: The 'static borrow guarantees the data will not be
|
||||||
// moved/invalidated until it gets dropped (which is never).
|
// moved/invalidated until it gets dropped (which is never).
|
||||||
|
|
|
@ -29,7 +29,7 @@ impl<T: ?Sized> *const T {
|
||||||
/// assert!(!ptr.is_null());
|
/// assert!(!ptr.is_null());
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_ptr_is_null", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_ptr_is_null", since = "1.84.0")]
|
||||||
#[rustc_diagnostic_item = "ptr_const_is_null"]
|
#[rustc_diagnostic_item = "ptr_const_is_null"]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_allow_const_fn_unstable(const_eval_select)]
|
#[rustc_allow_const_fn_unstable(const_eval_select)]
|
||||||
|
@ -159,7 +159,7 @@ impl<T: ?Sized> *const T {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn addr(self) -> usize {
|
pub fn addr(self) -> usize {
|
||||||
// A pointer-to-integer transmute currently has exactly the right semantics: it returns the
|
// A pointer-to-integer transmute currently has exactly the right semantics: it returns the
|
||||||
// address without exposing the provenance. Note that this is *not* a stable guarantee about
|
// address without exposing the provenance. Note that this is *not* a stable guarantee about
|
||||||
|
@ -193,7 +193,7 @@ impl<T: ?Sized> *const T {
|
||||||
/// [`with_exposed_provenance`]: with_exposed_provenance
|
/// [`with_exposed_provenance`]: with_exposed_provenance
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "exposed_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "exposed_provenance", since = "1.84.0")]
|
||||||
pub fn expose_provenance(self) -> usize {
|
pub fn expose_provenance(self) -> usize {
|
||||||
self.cast::<()>() as usize
|
self.cast::<()>() as usize
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ impl<T: ?Sized> *const T {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn with_addr(self, addr: usize) -> Self {
|
pub fn with_addr(self, addr: usize) -> Self {
|
||||||
// This should probably be an intrinsic to avoid doing any sort of arithmetic, but
|
// This should probably be an intrinsic to avoid doing any sort of arithmetic, but
|
||||||
// meanwhile, we can implement it with `wrapping_offset`, which preserves the pointer's
|
// meanwhile, we can implement it with `wrapping_offset`, which preserves the pointer's
|
||||||
|
@ -230,7 +230,7 @@ impl<T: ?Sized> *const T {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self {
|
pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self {
|
||||||
self.with_addr(f(self.addr()))
|
self.with_addr(f(self.addr()))
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,7 @@ impl<T: ?Sized> *const T {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
|
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
|
||||||
#[rustc_const_stable(feature = "const_ptr_is_null", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_ptr_is_null", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> {
|
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> {
|
||||||
// SAFETY: the caller must guarantee that `self` is valid
|
// SAFETY: the caller must guarantee that `self` is valid
|
||||||
|
|
|
@ -591,8 +591,8 @@ pub const fn null_mut<T: ?Sized + Thin>() -> *mut T {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub const fn without_provenance<T>(addr: usize) -> *const T {
|
pub const fn without_provenance<T>(addr: usize) -> *const T {
|
||||||
// An int-to-pointer transmute currently has exactly the intended semantics: it creates a
|
// An int-to-pointer transmute currently has exactly the intended semantics: it creates a
|
||||||
// pointer without provenance. Note that this is *not* a stable guarantee about transmute
|
// pointer without provenance. Note that this is *not* a stable guarantee about transmute
|
||||||
|
@ -613,8 +613,8 @@ pub const fn without_provenance<T>(addr: usize) -> *const T {
|
||||||
/// some other means.
|
/// some other means.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub const fn dangling<T>() -> *const T {
|
pub const fn dangling<T>() -> *const T {
|
||||||
without_provenance(mem::align_of::<T>())
|
without_provenance(mem::align_of::<T>())
|
||||||
}
|
}
|
||||||
|
@ -634,8 +634,8 @@ pub const fn dangling<T>() -> *const T {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub const fn without_provenance_mut<T>(addr: usize) -> *mut T {
|
pub const fn without_provenance_mut<T>(addr: usize) -> *mut T {
|
||||||
// An int-to-pointer transmute currently has exactly the intended semantics: it creates a
|
// An int-to-pointer transmute currently has exactly the intended semantics: it creates a
|
||||||
// pointer without provenance. Note that this is *not* a stable guarantee about transmute
|
// pointer without provenance. Note that this is *not* a stable guarantee about transmute
|
||||||
|
@ -656,8 +656,8 @@ pub const fn without_provenance_mut<T>(addr: usize) -> *mut T {
|
||||||
/// some other means.
|
/// some other means.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
#[rustc_const_stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub const fn dangling_mut<T>() -> *mut T {
|
pub const fn dangling_mut<T>() -> *mut T {
|
||||||
without_provenance_mut(mem::align_of::<T>())
|
without_provenance_mut(mem::align_of::<T>())
|
||||||
}
|
}
|
||||||
|
@ -695,7 +695,7 @@ pub const fn dangling_mut<T>() -> *mut T {
|
||||||
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
|
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "exposed_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "exposed_provenance", since = "1.84.0")]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[allow(fuzzy_provenance_casts)] // this *is* the explicit provenance API one should use instead
|
#[allow(fuzzy_provenance_casts)] // this *is* the explicit provenance API one should use instead
|
||||||
pub fn with_exposed_provenance<T>(addr: usize) -> *const T {
|
pub fn with_exposed_provenance<T>(addr: usize) -> *const T {
|
||||||
|
@ -735,7 +735,7 @@ pub fn with_exposed_provenance<T>(addr: usize) -> *const T {
|
||||||
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
|
/// This is an [Exposed Provenance][crate::ptr#exposed-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "exposed_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "exposed_provenance", since = "1.84.0")]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[allow(fuzzy_provenance_casts)] // this *is* the explicit provenance API one should use instead
|
#[allow(fuzzy_provenance_casts)] // this *is* the explicit provenance API one should use instead
|
||||||
pub fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T {
|
pub fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T {
|
||||||
|
|
|
@ -29,7 +29,7 @@ impl<T: ?Sized> *mut T {
|
||||||
/// assert!(!ptr.is_null());
|
/// assert!(!ptr.is_null());
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_ptr_is_null", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_ptr_is_null", since = "1.84.0")]
|
||||||
#[rustc_diagnostic_item = "ptr_is_null"]
|
#[rustc_diagnostic_item = "ptr_is_null"]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn is_null(self) -> bool {
|
pub const fn is_null(self) -> bool {
|
||||||
|
@ -146,7 +146,7 @@ impl<T: ?Sized> *mut T {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn addr(self) -> usize {
|
pub fn addr(self) -> usize {
|
||||||
// A pointer-to-integer transmute currently has exactly the right semantics: it returns the
|
// A pointer-to-integer transmute currently has exactly the right semantics: it returns the
|
||||||
// address without exposing the provenance. Note that this is *not* a stable guarantee about
|
// address without exposing the provenance. Note that this is *not* a stable guarantee about
|
||||||
|
@ -179,7 +179,7 @@ impl<T: ?Sized> *mut T {
|
||||||
///
|
///
|
||||||
/// [`with_exposed_provenance_mut`]: with_exposed_provenance_mut
|
/// [`with_exposed_provenance_mut`]: with_exposed_provenance_mut
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "exposed_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "exposed_provenance", since = "1.84.0")]
|
||||||
pub fn expose_provenance(self) -> usize {
|
pub fn expose_provenance(self) -> usize {
|
||||||
self.cast::<()>() as usize
|
self.cast::<()>() as usize
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ impl<T: ?Sized> *mut T {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn with_addr(self, addr: usize) -> Self {
|
pub fn with_addr(self, addr: usize) -> Self {
|
||||||
// This should probably be an intrinsic to avoid doing any sort of arithmetic, but
|
// This should probably be an intrinsic to avoid doing any sort of arithmetic, but
|
||||||
// meanwhile, we can implement it with `wrapping_offset`, which preserves the pointer's
|
// meanwhile, we can implement it with `wrapping_offset`, which preserves the pointer's
|
||||||
|
@ -216,7 +216,7 @@ impl<T: ?Sized> *mut T {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self {
|
pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self {
|
||||||
self.with_addr(f(self.addr()))
|
self.with_addr(f(self.addr()))
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ impl<T: ?Sized> *mut T {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
|
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
|
||||||
#[rustc_const_stable(feature = "const_ptr_is_null", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_ptr_is_null", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> {
|
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> {
|
||||||
// SAFETY: the caller must guarantee that `self` is valid for a
|
// SAFETY: the caller must guarantee that `self` is valid for a
|
||||||
|
@ -619,7 +619,7 @@ impl<T: ?Sized> *mut T {
|
||||||
/// println!("{s:?}"); // It'll print: "[4, 2, 3]".
|
/// println!("{s:?}"); // It'll print: "[4, 2, 3]".
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
|
#[stable(feature = "ptr_as_ref", since = "1.9.0")]
|
||||||
#[rustc_const_stable(feature = "const_ptr_is_null", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_ptr_is_null", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const unsafe fn as_mut<'a>(self) -> Option<&'a mut T> {
|
pub const unsafe fn as_mut<'a>(self) -> Option<&'a mut T> {
|
||||||
// SAFETY: the caller must guarantee that `self` is be valid for
|
// SAFETY: the caller must guarantee that `self` is be valid for
|
||||||
|
|
|
@ -278,7 +278,7 @@ impl<T: ?Sized> NonNull<T> {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn addr(self) -> NonZero<usize> {
|
pub fn addr(self) -> NonZero<usize> {
|
||||||
// SAFETY: The pointer is guaranteed by the type to be non-null,
|
// SAFETY: The pointer is guaranteed by the type to be non-null,
|
||||||
// meaning that the address will be non-zero.
|
// meaning that the address will be non-zero.
|
||||||
|
@ -293,7 +293,7 @@ impl<T: ?Sized> NonNull<T> {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn with_addr(self, addr: NonZero<usize>) -> Self {
|
pub fn with_addr(self, addr: NonZero<usize>) -> Self {
|
||||||
// SAFETY: The result of `ptr::from::with_addr` is non-null because `addr` is guaranteed to be non-zero.
|
// SAFETY: The result of `ptr::from::with_addr` is non-null because `addr` is guaranteed to be non-zero.
|
||||||
unsafe { NonNull::new_unchecked(self.pointer.with_addr(addr.get()) as *mut _) }
|
unsafe { NonNull::new_unchecked(self.pointer.with_addr(addr.get()) as *mut _) }
|
||||||
|
@ -307,7 +307,7 @@ impl<T: ?Sized> NonNull<T> {
|
||||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||||
pub fn map_addr(self, f: impl FnOnce(NonZero<usize>) -> NonZero<usize>) -> Self {
|
pub fn map_addr(self, f: impl FnOnce(NonZero<usize>) -> NonZero<usize>) -> Self {
|
||||||
self.with_addr(f(self.addr()))
|
self.with_addr(f(self.addr()))
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ impl [u8] {
|
||||||
///
|
///
|
||||||
/// [`to_ascii_uppercase`]: #method.to_ascii_uppercase
|
/// [`to_ascii_uppercase`]: #method.to_ascii_uppercase
|
||||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||||
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn make_ascii_uppercase(&mut self) {
|
pub const fn make_ascii_uppercase(&mut self) {
|
||||||
// FIXME(const-hack): We would like to simply iterate using `for` loops but this isn't currently allowed in constant expressions.
|
// FIXME(const-hack): We would like to simply iterate using `for` loops but this isn't currently allowed in constant expressions.
|
||||||
|
@ -110,7 +110,7 @@ impl [u8] {
|
||||||
///
|
///
|
||||||
/// [`to_ascii_lowercase`]: #method.to_ascii_lowercase
|
/// [`to_ascii_lowercase`]: #method.to_ascii_lowercase
|
||||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||||
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn make_ascii_lowercase(&mut self) {
|
pub const fn make_ascii_lowercase(&mut self) {
|
||||||
// FIXME(const-hack): We would like to simply iterate using `for` loops but this isn't currently allowed in constant expressions.
|
// FIXME(const-hack): We would like to simply iterate using `for` loops but this isn't currently allowed in constant expressions.
|
||||||
|
|
|
@ -2503,7 +2503,7 @@ impl str {
|
||||||
/// assert_eq!("GRüßE, JüRGEN ❤", s);
|
/// assert_eq!("GRüßE, JüRGEN ❤", s);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||||
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn make_ascii_uppercase(&mut self) {
|
pub const fn make_ascii_uppercase(&mut self) {
|
||||||
// SAFETY: changing ASCII letters only does not invalidate UTF-8.
|
// SAFETY: changing ASCII letters only does not invalidate UTF-8.
|
||||||
|
@ -2531,7 +2531,7 @@ impl str {
|
||||||
/// assert_eq!("grÜße, jÜrgen ❤", s);
|
/// assert_eq!("grÜße, jÜrgen ❤", s);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||||
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn make_ascii_lowercase(&mut self) {
|
pub const fn make_ascii_lowercase(&mut self) {
|
||||||
// SAFETY: changing ASCII letters only does not invalidate UTF-8.
|
// SAFETY: changing ASCII letters only does not invalidate UTF-8.
|
||||||
|
|
|
@ -469,7 +469,7 @@ impl AtomicBool {
|
||||||
/// [valid]: crate::ptr#safety
|
/// [valid]: crate::ptr#safety
|
||||||
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
||||||
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
|
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
|
||||||
#[rustc_const_stable(feature = "const_atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_atomic_from_ptr", since = "1.84.0")]
|
||||||
pub const unsafe fn from_ptr<'a>(ptr: *mut bool) -> &'a AtomicBool {
|
pub const unsafe fn from_ptr<'a>(ptr: *mut bool) -> &'a AtomicBool {
|
||||||
// SAFETY: guaranteed by the caller
|
// SAFETY: guaranteed by the caller
|
||||||
unsafe { &*ptr.cast() }
|
unsafe { &*ptr.cast() }
|
||||||
|
@ -1264,7 +1264,7 @@ impl<T> AtomicPtr<T> {
|
||||||
/// [valid]: crate::ptr#safety
|
/// [valid]: crate::ptr#safety
|
||||||
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
||||||
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
|
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
|
||||||
#[rustc_const_stable(feature = "const_atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_atomic_from_ptr", since = "1.84.0")]
|
||||||
pub const unsafe fn from_ptr<'a>(ptr: *mut *mut T) -> &'a AtomicPtr<T> {
|
pub const unsafe fn from_ptr<'a>(ptr: *mut *mut T) -> &'a AtomicPtr<T> {
|
||||||
// SAFETY: guaranteed by the caller
|
// SAFETY: guaranteed by the caller
|
||||||
unsafe { &*ptr.cast() }
|
unsafe { &*ptr.cast() }
|
||||||
|
@ -2263,7 +2263,7 @@ macro_rules! atomic_int {
|
||||||
/// [valid]: crate::ptr#safety
|
/// [valid]: crate::ptr#safety
|
||||||
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
||||||
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
|
#[stable(feature = "atomic_from_ptr", since = "1.75.0")]
|
||||||
#[rustc_const_stable(feature = "const_atomic_from_ptr", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_atomic_from_ptr", since = "1.84.0")]
|
||||||
pub const unsafe fn from_ptr<'a>(ptr: *mut $int_type) -> &'a $atomic_type {
|
pub const unsafe fn from_ptr<'a>(ptr: *mut $int_type) -> &'a $atomic_type {
|
||||||
// SAFETY: guaranteed by the caller
|
// SAFETY: guaranteed by the caller
|
||||||
unsafe { &*ptr.cast() }
|
unsafe { &*ptr.cast() }
|
||||||
|
|
|
@ -1225,7 +1225,7 @@ impl From<&OsStr> for Box<OsStr> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "box_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut OsStr> for Box<OsStr> {
|
impl From<&mut OsStr> for Box<OsStr> {
|
||||||
/// Copies the string into a newly allocated <code>[Box]<[OsStr]></code>.
|
/// Copies the string into a newly allocated <code>[Box]<[OsStr]></code>.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -1305,7 +1305,7 @@ impl From<&OsStr> for Arc<OsStr> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut OsStr> for Arc<OsStr> {
|
impl From<&mut OsStr> for Arc<OsStr> {
|
||||||
/// Copies the string into a newly allocated <code>[Arc]<[OsStr]></code>.
|
/// Copies the string into a newly allocated <code>[Arc]<[OsStr]></code>.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -1335,7 +1335,7 @@ impl From<&OsStr> for Rc<OsStr> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut OsStr> for Rc<OsStr> {
|
impl From<&mut OsStr> for Rc<OsStr> {
|
||||||
/// Copies the string into a newly allocated <code>[Rc]<[OsStr]></code>.
|
/// Copies the string into a newly allocated <code>[Rc]<[OsStr]></code>.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//! `aarch64-apple-darwin` target names, which are mostly named that way for
|
//! `aarch64-apple-darwin` target names, which are mostly named that way for
|
||||||
//! legacy reasons.
|
//! legacy reasons.
|
||||||
|
|
||||||
#![stable(feature = "os_darwin", since = "CURRENT_RUSTC_VERSION")]
|
#![stable(feature = "os_darwin", since = "1.84.0")]
|
||||||
#![doc(cfg(target_vendor = "apple"))]
|
#![doc(cfg(target_vendor = "apple"))]
|
||||||
|
|
||||||
pub mod fs;
|
pub mod fs;
|
||||||
|
|
|
@ -1762,7 +1762,7 @@ impl From<&Path> for Box<Path> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "box_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut Path> for Box<Path> {
|
impl From<&mut Path> for Box<Path> {
|
||||||
/// Creates a boxed [`Path`] from a reference.
|
/// Creates a boxed [`Path`] from a reference.
|
||||||
///
|
///
|
||||||
|
@ -2000,7 +2000,7 @@ impl From<&Path> for Arc<Path> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut Path> for Arc<Path> {
|
impl From<&mut Path> for Arc<Path> {
|
||||||
/// Converts a [`Path`] into an [`Arc`] by copying the [`Path`] data into a new [`Arc`] buffer.
|
/// Converts a [`Path`] into an [`Arc`] by copying the [`Path`] data into a new [`Arc`] buffer.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -2030,7 +2030,7 @@ impl From<&Path> for Rc<Path> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
|
||||||
impl From<&mut Path> for Rc<Path> {
|
impl From<&mut Path> for Rc<Path> {
|
||||||
/// Converts a [`Path`] into an [`Rc`] by copying the [`Path`] data into a new [`Rc`] buffer.
|
/// Converts a [`Path`] into an [`Rc`] by copying the [`Path`] data into a new [`Rc`] buffer.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -1596,15 +1596,9 @@ impl Step for Extended {
|
||||||
prepare("cargo");
|
prepare("cargo");
|
||||||
prepare("rust-std");
|
prepare("rust-std");
|
||||||
prepare("rust-analysis");
|
prepare("rust-analysis");
|
||||||
|
prepare("clippy");
|
||||||
for tool in &[
|
prepare("rust-analyzer");
|
||||||
"clippy",
|
for tool in &["rust-docs", "miri", "rustc-codegen-cranelift"] {
|
||||||
"rustfmt",
|
|
||||||
"rust-analyzer",
|
|
||||||
"rust-docs",
|
|
||||||
"miri",
|
|
||||||
"rustc-codegen-cranelift",
|
|
||||||
] {
|
|
||||||
if built_tools.contains(tool) {
|
if built_tools.contains(tool) {
|
||||||
prepare(tool);
|
prepare(tool);
|
||||||
}
|
}
|
||||||
|
@ -1644,8 +1638,6 @@ impl Step for Extended {
|
||||||
"rust-analyzer-preview".to_string()
|
"rust-analyzer-preview".to_string()
|
||||||
} else if name == "clippy" {
|
} else if name == "clippy" {
|
||||||
"clippy-preview".to_string()
|
"clippy-preview".to_string()
|
||||||
} else if name == "rustfmt" {
|
|
||||||
"rustfmt-preview".to_string()
|
|
||||||
} else if name == "miri" {
|
} else if name == "miri" {
|
||||||
"miri-preview".to_string()
|
"miri-preview".to_string()
|
||||||
} else if name == "rustc-codegen-cranelift" {
|
} else if name == "rustc-codegen-cranelift" {
|
||||||
|
@ -1665,7 +1657,7 @@ impl Step for Extended {
|
||||||
prepare("cargo");
|
prepare("cargo");
|
||||||
prepare("rust-analysis");
|
prepare("rust-analysis");
|
||||||
prepare("rust-std");
|
prepare("rust-std");
|
||||||
for tool in &["clippy", "rustfmt", "rust-analyzer", "rust-docs", "miri"] {
|
for tool in &["clippy", "rust-analyzer", "rust-docs", "miri"] {
|
||||||
if built_tools.contains(tool) {
|
if built_tools.contains(tool) {
|
||||||
prepare(tool);
|
prepare(tool);
|
||||||
}
|
}
|
||||||
|
@ -1783,24 +1775,6 @@ impl Step for Extended {
|
||||||
.arg(etc.join("msi/remove-duplicates.xsl"))
|
.arg(etc.join("msi/remove-duplicates.xsl"))
|
||||||
.run(builder);
|
.run(builder);
|
||||||
}
|
}
|
||||||
if built_tools.contains("rustfmt") {
|
|
||||||
command(&heat)
|
|
||||||
.current_dir(&exe)
|
|
||||||
.arg("dir")
|
|
||||||
.arg("rustfmt")
|
|
||||||
.args(heat_flags)
|
|
||||||
.arg("-cg")
|
|
||||||
.arg("RustFmtGroup")
|
|
||||||
.arg("-dr")
|
|
||||||
.arg("RustFmt")
|
|
||||||
.arg("-var")
|
|
||||||
.arg("var.RustFmtDir")
|
|
||||||
.arg("-out")
|
|
||||||
.arg(exe.join("RustFmtGroup.wxs"))
|
|
||||||
.arg("-t")
|
|
||||||
.arg(etc.join("msi/remove-duplicates.xsl"))
|
|
||||||
.run(builder);
|
|
||||||
}
|
|
||||||
if built_tools.contains("miri") {
|
if built_tools.contains("miri") {
|
||||||
command(&heat)
|
command(&heat)
|
||||||
.current_dir(&exe)
|
.current_dir(&exe)
|
||||||
|
@ -1872,9 +1846,6 @@ impl Step for Extended {
|
||||||
if built_tools.contains("clippy") {
|
if built_tools.contains("clippy") {
|
||||||
cmd.arg("-dClippyDir=clippy");
|
cmd.arg("-dClippyDir=clippy");
|
||||||
}
|
}
|
||||||
if built_tools.contains("rustfmt") {
|
|
||||||
cmd.arg("-dRustFmtDir=rustfmt");
|
|
||||||
}
|
|
||||||
if built_tools.contains("rust-docs") {
|
if built_tools.contains("rust-docs") {
|
||||||
cmd.arg("-dDocsDir=rust-docs");
|
cmd.arg("-dDocsDir=rust-docs");
|
||||||
}
|
}
|
||||||
|
@ -1901,9 +1872,6 @@ impl Step for Extended {
|
||||||
if built_tools.contains("clippy") {
|
if built_tools.contains("clippy") {
|
||||||
candle("ClippyGroup.wxs".as_ref());
|
candle("ClippyGroup.wxs".as_ref());
|
||||||
}
|
}
|
||||||
if built_tools.contains("rustfmt") {
|
|
||||||
candle("RustFmtGroup.wxs".as_ref());
|
|
||||||
}
|
|
||||||
if built_tools.contains("miri") {
|
if built_tools.contains("miri") {
|
||||||
candle("MiriGroup.wxs".as_ref());
|
candle("MiriGroup.wxs".as_ref());
|
||||||
}
|
}
|
||||||
|
@ -1942,9 +1910,6 @@ impl Step for Extended {
|
||||||
if built_tools.contains("clippy") {
|
if built_tools.contains("clippy") {
|
||||||
cmd.arg("ClippyGroup.wixobj");
|
cmd.arg("ClippyGroup.wixobj");
|
||||||
}
|
}
|
||||||
if built_tools.contains("rustfmt") {
|
|
||||||
cmd.arg("RustFmtGroup.wixobj");
|
|
||||||
}
|
|
||||||
if built_tools.contains("miri") {
|
if built_tools.contains("miri") {
|
||||||
cmd.arg("MiriGroup.wixobj");
|
cmd.arg("MiriGroup.wixobj");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly
|
beta
|
||||||
|
|
|
@ -172,11 +172,6 @@
|
||||||
<!-- tool-rust-docs-end -->
|
<!-- tool-rust-docs-end -->
|
||||||
<Directory Id="Cargo" Name="." />
|
<Directory Id="Cargo" Name="." />
|
||||||
<Directory Id="Std" Name="." />
|
<Directory Id="Std" Name="." />
|
||||||
<Directory Id="RustFmt" Name="." />
|
|
||||||
<Directory Id="RustAnalyzer" Name="." />
|
|
||||||
<Directory Id="Miri" Name="." />
|
|
||||||
<Directory Id="Analysis" Name="." />
|
|
||||||
<Directory Id="Clippy" Name="." />
|
|
||||||
</Directory>
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
@ -284,41 +279,7 @@
|
||||||
<ComponentRef Id="PathEnvPerMachine" />
|
<ComponentRef Id="PathEnvPerMachine" />
|
||||||
<ComponentRef Id="PathEnvPerUser" />
|
<ComponentRef Id="PathEnvPerUser" />
|
||||||
</Feature>
|
</Feature>
|
||||||
<Feature Id="RustFmt"
|
|
||||||
Title="Formatter for rust"
|
|
||||||
Display="7"
|
|
||||||
Level="1"
|
|
||||||
AllowAdvertise="no">
|
|
||||||
<ComponentGroupRef Id="RustFmtGroup" />
|
|
||||||
</Feature>
|
|
||||||
<Feature Id="Clippy"
|
|
||||||
Title="Formatter and checker for rust"
|
|
||||||
Display="8"
|
|
||||||
Level="1"
|
|
||||||
AllowAdvertise="no">
|
|
||||||
<ComponentGroupRef Id="ClippyGroup" />
|
|
||||||
</Feature>
|
|
||||||
<Feature Id="Miri"
|
|
||||||
Title="Soundness checker for rust"
|
|
||||||
Display="9"
|
|
||||||
Level="1"
|
|
||||||
AllowAdvertise="no">
|
|
||||||
<ComponentGroupRef Id="MiriGroup" />
|
|
||||||
</Feature>
|
|
||||||
<Feature Id="RustAnalyzer"
|
|
||||||
Title="Analyzer for rust"
|
|
||||||
Display="10"
|
|
||||||
Level="1"
|
|
||||||
AllowAdvertise="no">
|
|
||||||
<ComponentGroupRef Id="RustAnalyzerGroup" />
|
|
||||||
</Feature>
|
|
||||||
<Feature Id="Analysis"
|
|
||||||
Title="Analysis for rust"
|
|
||||||
Display="11"
|
|
||||||
Level="1"
|
|
||||||
AllowAdvertise="no">
|
|
||||||
<ComponentGroupRef Id="AnalysisGroup" />
|
|
||||||
</Feature>
|
|
||||||
<UIRef Id="RustUI" />
|
<UIRef Id="RustUI" />
|
||||||
</Product>
|
</Product>
|
||||||
</Wix>
|
</Wix>
|
||||||
|
|
|
@ -159,6 +159,9 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
|
||||||
.skipped_tests(vec![
|
.skipped_tests(vec![
|
||||||
// Fails because of linker errors, as of June 2023.
|
// Fails because of linker errors, as of June 2023.
|
||||||
"tests/ui/process/nofile-limit.rs".to_string(),
|
"tests/ui/process/nofile-limit.rs".to_string(),
|
||||||
|
// FIXME(#133503): the rustc under test here during beta bump seems to be beta
|
||||||
|
// but `//@ only-nightly` was active.
|
||||||
|
"tests/ui/bootstrap/rustc_bootstap.rs".to_string(),
|
||||||
])
|
])
|
||||||
.build()?;
|
.build()?;
|
||||||
|
|
||||||
|
@ -181,6 +184,9 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
|
||||||
.skipped_tests(vec![
|
.skipped_tests(vec![
|
||||||
// Fails as of June 2023.
|
// Fails as of June 2023.
|
||||||
"tests\\codegen\\vec-shrink-panik.rs".to_string(),
|
"tests\\codegen\\vec-shrink-panik.rs".to_string(),
|
||||||
|
// FIXME(#133503): the rustc under test here during beta bump seems to be beta
|
||||||
|
// but `//@ only-nightly` was active.
|
||||||
|
"tests\\ui\\bootstrap\\rustc_bootstap.rs".to_string(),
|
||||||
])
|
])
|
||||||
.build()?;
|
.build()?;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue