mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 12:43:36 +00:00
replace placeholder version
This commit is contained in:
parent
5f8a2405a6
commit
174ad448c7
@ -225,7 +225,7 @@ declare_features! (
|
||||
/// Allows the use of `if let` expressions.
|
||||
(accepted, if_let, "1.0.0", None),
|
||||
/// 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`.
|
||||
(accepted, if_while_or_patterns, "1.33.0", Some(48215)),
|
||||
/// Allows lifetime elision in `impl` headers. For example:
|
||||
@ -357,7 +357,7 @@ declare_features! (
|
||||
(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
|
||||
/// 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.
|
||||
(accepted, return_position_impl_trait_in_trait, "1.75.0", Some(91611)),
|
||||
/// Allows code like `let x: &'static u32 = &42` to work (RFC 1414).
|
||||
@ -367,7 +367,7 @@ declare_features! (
|
||||
/// Allows `Self` struct constructor (RFC 2302).
|
||||
(accepted, self_struct_ctor, "1.32.0", Some(51994)),
|
||||
/// 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]`.
|
||||
(accepted, slice_patterns, "1.42.0", Some(62254)),
|
||||
/// 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).
|
||||
(removed, dropck_parametricity, "1.38.0", Some(28498), None),
|
||||
/// 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)]`")),
|
||||
/// Allows defining `existential type`s.
|
||||
(removed, existential_type, "1.38.0", Some(63063),
|
||||
|
@ -338,7 +338,7 @@ declare_features! (
|
||||
(unstable, riscv_target_feature, "1.45.0", Some(44839)),
|
||||
(unstable, rtm_target_feature, "1.35.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, tbm_target_feature, "1.27.0", Some(44839)),
|
||||
(unstable, wasm_target_feature, "1.30.0", Some(44839)),
|
||||
@ -538,7 +538,7 @@ declare_features! (
|
||||
/// Allows `#[marker]` on certain traits allowing overlapping implementations.
|
||||
(unstable, marker_trait_attr, "1.30.0", Some(29864)),
|
||||
/// 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
|
||||
/// standard library until the soundness issues with specialization
|
||||
/// are fixed.
|
||||
|
@ -110,7 +110,7 @@ impl<T: Clone> From<&[T]> for Box<[T]> {
|
||||
}
|
||||
|
||||
#[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]> {
|
||||
/// Converts a `&mut [T]` into a `Box<[T]>`
|
||||
///
|
||||
@ -171,7 +171,7 @@ impl From<&str> for Box<str> {
|
||||
}
|
||||
|
||||
#[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> {
|
||||
/// Converts a `&mut str` into a `Box<str>`
|
||||
///
|
||||
|
@ -773,7 +773,7 @@ impl From<&CStr> for Box<CStr> {
|
||||
}
|
||||
|
||||
#[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> {
|
||||
/// Converts a `&mut CStr` into a `Box<CStr>`,
|
||||
/// by copying the contents into a newly allocated [`Box`].
|
||||
@ -921,7 +921,7 @@ impl From<&CStr> for Arc<CStr> {
|
||||
}
|
||||
|
||||
#[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> {
|
||||
/// Converts a `&mut CStr` into a `Arc<CStr>`,
|
||||
/// 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> {
|
||||
/// Converts a `&mut CStr` into a `Rc<CStr>`,
|
||||
/// 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))]
|
||||
#[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]> {
|
||||
/// 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))]
|
||||
#[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> {
|
||||
/// 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))]
|
||||
#[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]> {
|
||||
/// 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))]
|
||||
#[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> {
|
||||
/// 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);
|
||||
/// ```
|
||||
#[inline(always)]
|
||||
#[stable(feature = "unsafe_cell_from_mut", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_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 = "1.84.0")]
|
||||
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
|
||||
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)].
|
||||
|
@ -729,7 +729,7 @@ impl char {
|
||||
/// '𝕊'.encode_utf16(&mut b);
|
||||
/// ```
|
||||
#[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]
|
||||
pub const fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] {
|
||||
encode_utf16_raw(self as u32, dst)
|
||||
@ -1299,7 +1299,7 @@ impl char {
|
||||
///
|
||||
/// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
|
||||
#[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]
|
||||
pub const fn make_ascii_uppercase(&mut self) {
|
||||
*self = self.to_ascii_uppercase();
|
||||
@ -1325,7 +1325,7 @@ impl char {
|
||||
///
|
||||
/// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
|
||||
#[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]
|
||||
pub const fn make_ascii_lowercase(&mut self) {
|
||||
*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")]
|
||||
#[cfg_attr(
|
||||
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)]
|
||||
#[inline]
|
||||
|
@ -438,7 +438,7 @@ impl<'a> Arguments<'a> {
|
||||
/// assert_eq!(format_args!("{:?}", std::env::current_dir()).as_str(), None);
|
||||
/// ```
|
||||
#[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]
|
||||
#[inline]
|
||||
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.
|
||||
#[cfg_attr(
|
||||
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")]
|
||||
#[rustc_nounwind]
|
||||
@ -1526,7 +1526,7 @@ pub const fn likely(b: bool) -> bool {
|
||||
/// This intrinsic does not have a stable counterpart.
|
||||
#[cfg_attr(
|
||||
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")]
|
||||
#[rustc_nounwind]
|
||||
@ -3629,7 +3629,7 @@ pub(crate) macro const_eval_select {
|
||||
/// ```
|
||||
#[cfg_attr(
|
||||
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)]
|
||||
#[rustc_nounwind]
|
||||
|
@ -913,7 +913,7 @@ impl<T> MaybeUninit<T> {
|
||||
#[stable(feature = "maybe_uninit_ref", since = "1.55.0")]
|
||||
#[rustc_const_stable(
|
||||
feature = "const_maybe_uninit_assume_init",
|
||||
since = "CURRENT_RUSTC_VERSION"
|
||||
since = "1.84.0"
|
||||
)]
|
||||
#[inline(always)]
|
||||
pub const unsafe fn assume_init_mut(&mut self) -> &mut T {
|
||||
|
@ -1601,8 +1601,8 @@ impl Ipv6Addr {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_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 = "1.84.0")]
|
||||
pub const fn is_unique_local(&self) -> bool {
|
||||
(self.segments()[0] & 0xfe00) == 0xfc00
|
||||
}
|
||||
@ -1679,8 +1679,8 @@ impl Ipv6Addr {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_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 = "1.84.0")]
|
||||
pub const fn is_unicast_link_local(&self) -> bool {
|
||||
(self.segments()[0] & 0xffc0) == 0xfe80
|
||||
}
|
||||
|
@ -1613,8 +1613,8 @@ macro_rules! int_impl {
|
||||
/// ```
|
||||
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".checked_isqrt(), Some(3));")]
|
||||
/// ```
|
||||
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "isqrt", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "isqrt", since = "1.84.0")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
@ -2860,8 +2860,8 @@ macro_rules! int_impl {
|
||||
/// ```
|
||||
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
|
||||
/// ```
|
||||
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "isqrt", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "isqrt", since = "1.84.0")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
|
@ -677,7 +677,7 @@ impl u8 {
|
||||
///
|
||||
/// [`to_ascii_uppercase`]: Self::to_ascii_uppercase
|
||||
#[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]
|
||||
pub const fn make_ascii_uppercase(&mut self) {
|
||||
*self = self.to_ascii_uppercase();
|
||||
@ -703,7 +703,7 @@ impl u8 {
|
||||
///
|
||||
/// [`to_ascii_lowercase`]: Self::to_ascii_lowercase
|
||||
#[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]
|
||||
pub const fn make_ascii_lowercase(&mut self) {
|
||||
*self = self.to_ascii_lowercase();
|
||||
|
@ -139,9 +139,9 @@ impl_nonzero_fmt! {
|
||||
LowerHex
|
||||
#[stable(feature = "nonzero", since = "1.28.0")]
|
||||
UpperHex
|
||||
#[stable(feature = "nonzero_fmt_exp", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "nonzero_fmt_exp", since = "1.84.0")]
|
||||
LowerExp
|
||||
#[stable(feature = "nonzero_fmt_exp", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "nonzero_fmt_exp", since = "1.84.0")]
|
||||
UpperExp
|
||||
}
|
||||
|
||||
@ -1587,8 +1587,8 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
|
||||
/// # Some(())
|
||||
/// # }
|
||||
/// ```
|
||||
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "isqrt", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "isqrt", since = "1.84.0")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
|
@ -2838,8 +2838,8 @@ macro_rules! uint_impl {
|
||||
/// ```
|
||||
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
|
||||
/// ```
|
||||
#[stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "isqrt", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "isqrt", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "isqrt", since = "1.84.0")]
|
||||
#[must_use = "this returns the result of the operation, \
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
|
@ -738,7 +738,7 @@ impl<T> Option<T> {
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[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>> {
|
||||
// FIXME(const-hack): use `map` once that is possible
|
||||
match Pin::get_ref(self).as_ref() {
|
||||
@ -755,7 +755,7 @@ impl<T> Option<T> {
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[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>> {
|
||||
// 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.
|
||||
@ -802,7 +802,7 @@ impl<T> Option<T> {
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[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] {
|
||||
// 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
|
||||
@ -857,7 +857,7 @@ impl<T> Option<T> {
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[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] {
|
||||
// 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
|
||||
|
@ -208,7 +208,7 @@ pub macro const_panic {
|
||||
#[rustc_allow_const_fn_unstable(const_eval_select)]
|
||||
#[inline(always)] // inline the wrapper
|
||||
#[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),*) -> ! {
|
||||
$crate::intrinsics::const_eval_select!(
|
||||
@capture { $($arg: $ty = $arg),* } -> !:
|
||||
|
@ -165,7 +165,7 @@ impl<'a> PanicMessage<'a> {
|
||||
///
|
||||
/// See [`fmt::Arguments::as_str`] for details.
|
||||
#[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]
|
||||
#[inline]
|
||||
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);
|
||||
/// ```
|
||||
#[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")]
|
||||
pub const fn new(pointer: Ptr) -> Pin<Ptr> {
|
||||
// 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)]
|
||||
#[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")]
|
||||
pub const fn into_inner(pin: Pin<Ptr>) -> Ptr {
|
||||
pin.__pointer
|
||||
@ -1352,7 +1352,7 @@ impl<Ptr: Deref> Pin<Ptr> {
|
||||
/// [`pin` module docs]: self
|
||||
#[lang = "new_unchecked"]
|
||||
#[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")]
|
||||
pub const unsafe fn new_unchecked(pointer: Ptr) -> Pin<Ptr> {
|
||||
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"
|
||||
/// implementations of `Ptr::DerefMut` are likewise ruled out by the contract of
|
||||
/// `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"]
|
||||
#[inline(always)]
|
||||
pub fn as_deref_mut(self: Pin<&mut Pin<Ptr>>) -> Pin<&mut Ptr::Target> {
|
||||
@ -1505,7 +1505,7 @@ impl<Ptr: Deref> Pin<Ptr> {
|
||||
/// instead.
|
||||
#[inline(always)]
|
||||
#[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")]
|
||||
pub const unsafe fn into_inner_unchecked(pin: Pin<Ptr>) -> Ptr {
|
||||
pin.__pointer
|
||||
@ -1561,7 +1561,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
|
||||
/// ["pinning projections"]: self#projections-and-structural-pinning
|
||||
#[inline(always)]
|
||||
#[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")]
|
||||
pub const fn get_ref(self) -> &'a T {
|
||||
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.
|
||||
#[inline(always)]
|
||||
#[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")]
|
||||
pub const fn into_ref(self) -> Pin<&'a T> {
|
||||
Pin { __pointer: self.__pointer }
|
||||
@ -1590,7 +1590,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
|
||||
#[inline(always)]
|
||||
#[must_use = "`self` will be dropped if the result is not used"]
|
||||
#[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
|
||||
where
|
||||
T: Unpin,
|
||||
@ -1611,7 +1611,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
|
||||
#[inline(always)]
|
||||
#[must_use = "`self` will be dropped if the result is not used"]
|
||||
#[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 {
|
||||
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
|
||||
/// never ends.
|
||||
#[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> {
|
||||
// SAFETY: The 'static borrow guarantees the data will not be
|
||||
// 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
|
||||
/// never ends.
|
||||
#[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> {
|
||||
// SAFETY: The 'static borrow guarantees the data will not be
|
||||
// moved/invalidated until it gets dropped (which is never).
|
||||
|
@ -29,7 +29,7 @@ impl<T: ?Sized> *const T {
|
||||
/// assert!(!ptr.is_null());
|
||||
/// ```
|
||||
#[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"]
|
||||
#[inline]
|
||||
#[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.
|
||||
#[must_use]
|
||||
#[inline(always)]
|
||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
pub fn addr(self) -> usize {
|
||||
// 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
|
||||
@ -193,7 +193,7 @@ impl<T: ?Sized> *const T {
|
||||
/// [`with_exposed_provenance`]: with_exposed_provenance
|
||||
#[must_use]
|
||||
#[inline(always)]
|
||||
#[stable(feature = "exposed_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "exposed_provenance", since = "1.84.0")]
|
||||
pub fn expose_provenance(self) -> usize {
|
||||
self.cast::<()>() as usize
|
||||
}
|
||||
@ -211,7 +211,7 @@ impl<T: ?Sized> *const T {
|
||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||
#[must_use]
|
||||
#[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 {
|
||||
// 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
|
||||
@ -230,7 +230,7 @@ impl<T: ?Sized> *const T {
|
||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||
#[must_use]
|
||||
#[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 {
|
||||
self.with_addr(f(self.addr()))
|
||||
}
|
||||
@ -282,7 +282,7 @@ impl<T: ?Sized> *const T {
|
||||
/// }
|
||||
/// ```
|
||||
#[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]
|
||||
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> {
|
||||
// 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.
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
pub const fn without_provenance<T>(addr: usize) -> *const T {
|
||||
// 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
|
||||
@ -613,8 +613,8 @@ pub const fn without_provenance<T>(addr: usize) -> *const T {
|
||||
/// some other means.
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
pub const fn dangling<T>() -> *const 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.
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
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
|
||||
// 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.
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
#[rustc_const_stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
pub const fn dangling_mut<T>() -> *mut 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.
|
||||
#[must_use]
|
||||
#[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
|
||||
#[allow(fuzzy_provenance_casts)] // this *is* the explicit provenance API one should use instead
|
||||
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.
|
||||
#[must_use]
|
||||
#[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
|
||||
#[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 {
|
||||
|
@ -29,7 +29,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// assert!(!ptr.is_null());
|
||||
/// ```
|
||||
#[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"]
|
||||
#[inline]
|
||||
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.
|
||||
#[must_use]
|
||||
#[inline(always)]
|
||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
pub fn addr(self) -> usize {
|
||||
// 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
|
||||
@ -179,7 +179,7 @@ impl<T: ?Sized> *mut T {
|
||||
///
|
||||
/// [`with_exposed_provenance_mut`]: with_exposed_provenance_mut
|
||||
#[inline(always)]
|
||||
#[stable(feature = "exposed_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "exposed_provenance", since = "1.84.0")]
|
||||
pub fn expose_provenance(self) -> usize {
|
||||
self.cast::<()>() as usize
|
||||
}
|
||||
@ -197,7 +197,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||
#[must_use]
|
||||
#[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 {
|
||||
// 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
|
||||
@ -216,7 +216,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||
#[must_use]
|
||||
#[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 {
|
||||
self.with_addr(f(self.addr()))
|
||||
}
|
||||
@ -271,7 +271,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// }
|
||||
/// ```
|
||||
#[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]
|
||||
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> {
|
||||
// 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]".
|
||||
/// ```
|
||||
#[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]
|
||||
pub const unsafe fn as_mut<'a>(self) -> Option<&'a mut T> {
|
||||
// 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.
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[stable(feature = "strict_provenance", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "strict_provenance", since = "1.84.0")]
|
||||
pub fn addr(self) -> NonZero<usize> {
|
||||
// SAFETY: The pointer is guaranteed by the type to be non-null,
|
||||
// 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.
|
||||
#[must_use]
|
||||
#[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 {
|
||||
// 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 _) }
|
||||
@ -307,7 +307,7 @@ impl<T: ?Sized> NonNull<T> {
|
||||
/// This is a [Strict Provenance][crate::ptr#strict-provenance] API.
|
||||
#[must_use]
|
||||
#[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 {
|
||||
self.with_addr(f(self.addr()))
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ impl [u8] {
|
||||
///
|
||||
/// [`to_ascii_uppercase`]: #method.to_ascii_uppercase
|
||||
#[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]
|
||||
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.
|
||||
@ -110,7 +110,7 @@ impl [u8] {
|
||||
///
|
||||
/// [`to_ascii_lowercase`]: #method.to_ascii_lowercase
|
||||
#[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]
|
||||
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.
|
||||
|
@ -2503,7 +2503,7 @@ impl str {
|
||||
/// assert_eq!("GRüßE, JüRGEN ❤", s);
|
||||
/// ```
|
||||
#[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]
|
||||
pub const fn make_ascii_uppercase(&mut self) {
|
||||
// SAFETY: changing ASCII letters only does not invalidate UTF-8.
|
||||
@ -2531,7 +2531,7 @@ impl str {
|
||||
/// assert_eq!("grÜße, jÜrgen ❤", s);
|
||||
/// ```
|
||||
#[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]
|
||||
pub const fn make_ascii_lowercase(&mut self) {
|
||||
// SAFETY: changing ASCII letters only does not invalidate UTF-8.
|
||||
|
@ -469,7 +469,7 @@ impl AtomicBool {
|
||||
/// [valid]: crate::ptr#safety
|
||||
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
||||
#[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 {
|
||||
// SAFETY: guaranteed by the caller
|
||||
unsafe { &*ptr.cast() }
|
||||
@ -1264,7 +1264,7 @@ impl<T> AtomicPtr<T> {
|
||||
/// [valid]: crate::ptr#safety
|
||||
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
||||
#[stable(feature = "atomic_from_ptr", since = "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> {
|
||||
// SAFETY: guaranteed by the caller
|
||||
unsafe { &*ptr.cast() }
|
||||
@ -2263,7 +2263,7 @@ macro_rules! atomic_int {
|
||||
/// [valid]: crate::ptr#safety
|
||||
/// [Memory model for atomic accesses]: self#memory-model-for-atomic-accesses
|
||||
#[stable(feature = "atomic_from_ptr", since = "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 {
|
||||
// SAFETY: guaranteed by the caller
|
||||
unsafe { &*ptr.cast() }
|
||||
|
@ -1229,7 +1229,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> {
|
||||
/// Copies the string into a newly allocated <code>[Box]<[OsStr]></code>.
|
||||
#[inline]
|
||||
@ -1309,7 +1309,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> {
|
||||
/// Copies the string into a newly allocated <code>[Arc]<[OsStr]></code>.
|
||||
#[inline]
|
||||
@ -1339,7 +1339,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> {
|
||||
/// Copies the string into a newly allocated <code>[Rc]<[OsStr]></code>.
|
||||
#[inline]
|
||||
|
@ -13,7 +13,7 @@
|
||||
//! `aarch64-apple-darwin` target names, which are mostly named that way for
|
||||
//! legacy reasons.
|
||||
|
||||
#![stable(feature = "os_darwin", since = "CURRENT_RUSTC_VERSION")]
|
||||
#![stable(feature = "os_darwin", since = "1.84.0")]
|
||||
#![doc(cfg(target_vendor = "apple"))]
|
||||
|
||||
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> {
|
||||
/// 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> {
|
||||
/// Converts a [`Path`] into an [`Arc`] by copying the [`Path`] data into a new [`Arc`] buffer.
|
||||
#[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> {
|
||||
/// Converts a [`Path`] into an [`Rc`] by copying the [`Path`] data into a new [`Rc`] buffer.
|
||||
#[inline]
|
||||
|
Loading…
Reference in New Issue
Block a user