Auto merge of #133447 - BoxyUwU:beta, r=BoxyUwU

[beta] Prepare Rust 1.84.0

r? `@ghost`
This commit is contained in:
bors
2024-11-26 19:15:15 +00:00
35 changed files with 111 additions and 179 deletions
+3 -3
View File
@@ -225,7 +225,7 @@ macro_rules! 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 @@ macro_rules! 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 @@ macro_rules! 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.
+1 -1
View File
@@ -101,7 +101,7 @@ macro_rules! 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),
+2 -2
View File
@@ -338,7 +338,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
(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)),
@@ -532,7 +532,7 @@ pub fn internal(&self, feature: Symbol) -> bool {
/// 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.
+2 -2
View File
@@ -110,7 +110,7 @@ fn from(slice: &[T]) -> 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 @@ fn from(s: &str) -> 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>`
///
+3 -3
View File
@@ -773,7 +773,7 @@ fn from(s: &CStr) -> 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 @@ fn from(s: &CStr) -> 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 @@ fn from(s: &CStr) -> 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`].
+2 -2
View File
@@ -2659,7 +2659,7 @@ fn from(v: &[T]) -> 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 @@ fn from(v: &str) -> 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.
///
+2 -2
View File
@@ -3618,7 +3618,7 @@ fn from(v: &[T]) -> 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 @@ fn from(v: &str) -> 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.
///
+2 -2
View File
@@ -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)].
+4 -4
View File
@@ -729,7 +729,7 @@ pub const fn encode_utf8(self, dst: &mut [u8]) -> &mut str {
/// '𝕊'.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 @@ pub const fn eq_ignore_ascii_case(&self, other: &char) -> bool {
///
/// [`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 @@ pub const fn make_ascii_uppercase(&mut self) {
///
/// [`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]
+1 -1
View File
@@ -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> {
+3 -3
View File
@@ -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 @@ const fn compiletime($($arg: $ty),*) $( -> $ret )? {
/// ```
#[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]
+1 -1
View File
@@ -909,7 +909,7 @@ pub unsafe fn assume_init_drop(&mut self) {
#[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 {
+4 -4
View File
@@ -1601,8 +1601,8 @@ pub const fn is_global(&self) -> bool {
/// ```
#[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 @@ pub const fn is_unicast(&self) -> bool {
/// ```
#[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
}
+4 -4
View File
@@ -1613,8 +1613,8 @@ pub const fn strict_pow(self, mut exp: u32) -> Self {
/// ```
#[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]
@@ -2859,8 +2859,8 @@ pub const fn pow(self, mut exp: u32) -> Self {
/// ```
#[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]
+2 -2
View File
@@ -677,7 +677,7 @@ pub const fn eq_ignore_ascii_case(&self, other: &u8) -> bool {
///
/// [`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 @@ pub const fn make_ascii_uppercase(&mut self) {
///
/// [`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();
+4 -4
View File
@@ -139,9 +139,9 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
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 @@ pub const fn is_power_of_two(self) -> bool {
/// # 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]
+2 -2
View File
@@ -2838,8 +2838,8 @@ pub const fn pow(self, mut exp: u32) -> Self {
/// ```
#[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]
+4 -4
View File
@@ -738,7 +738,7 @@ pub const fn as_mut(&mut self) -> Option<&mut 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 @@ pub const fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&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 @@ const fn len(&self) -> usize {
#[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 @@ pub const fn as_slice(&self) -> &[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
+1 -1
View File
@@ -208,7 +208,7 @@ fn as_str(&mut self) -> Option<&str> {
#[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),* } -> !:
+1 -1
View File
@@ -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> {
+11 -11
View File
@@ -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 @@ pub const fn new(pointer: Ptr) -> 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 @@ pub fn as_mut(&mut self) -> Pin<&mut Ptr::Target> {
/// 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 @@ pub unsafe fn map_unchecked<U, F>(self, func: F) -> Pin<&'a U>
/// ["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 @@ pub const fn into_ref(self) -> Pin<&'a 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 @@ pub const fn get_mut(self) -> &'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).
+6 -6
View File
@@ -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 @@ pub const fn cast_mut(self) -> *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
@@ -193,7 +193,7 @@ pub fn addr(self) -> usize {
/// [`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 @@ pub fn expose_provenance(self) -> usize {
/// 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 @@ pub fn with_addr(self, addr: usize) -> Self {
/// 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 @@ pub const fn to_raw_parts(self) -> (*const (), <T as super::Pointee>::Metadata)
/// }
/// ```
#[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
+10 -10
View File
@@ -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 {
+7 -7
View File
@@ -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 @@ pub const fn cast_const(self) -> *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
@@ -179,7 +179,7 @@ pub fn addr(self) -> usize {
///
/// [`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 @@ pub fn expose_provenance(self) -> usize {
/// 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 @@ pub fn with_addr(self, addr: usize) -> Self {
/// 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 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
/// }
/// ```
#[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 @@ pub fn mask(self, mask: usize) -> *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
+3 -3
View File
@@ -278,7 +278,7 @@ pub const fn to_raw_parts(self) -> (NonNull<()>, <T as super::Pointee>::Metadata
/// 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 @@ pub fn addr(self) -> NonZero<usize> {
/// 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 @@ pub fn with_addr(self, addr: NonZero<usize>) -> Self {
/// 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()))
}
+2 -2
View File
@@ -88,7 +88,7 @@ pub const fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool {
///
/// [`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 @@ pub const fn make_ascii_uppercase(&mut self) {
///
/// [`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.
+2 -2
View File
@@ -2503,7 +2503,7 @@ pub const fn eq_ignore_ascii_case(&self, other: &str) -> bool {
/// 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 @@ pub const fn make_ascii_uppercase(&mut self) {
/// 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.
+3 -3
View File
@@ -469,7 +469,7 @@ pub const fn new(v: bool) -> 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 @@ pub const fn new(p: *mut 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 @@ pub const fn new(v: $int_type) -> Self {
/// [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() }
+3 -3
View File
@@ -1225,7 +1225,7 @@ fn from(s: &OsStr) -> 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]&lt;[OsStr]&gt;</code>.
#[inline]
@@ -1305,7 +1305,7 @@ fn from(s: &OsStr) -> 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]&lt;[OsStr]&gt;</code>.
#[inline]
@@ -1335,7 +1335,7 @@ fn from(s: &OsStr) -> 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]&lt;[OsStr]&gt;</code>.
#[inline]
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -1762,7 +1762,7 @@ fn from(path: &Path) -> 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 @@ fn from(s: &Path) -> 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 @@ fn from(s: &Path) -> 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]
+4 -39
View File
@@ -1596,15 +1596,9 @@ fn filter(contents: &str, marker: &str) -> String {
prepare("cargo");
prepare("rust-std");
prepare("rust-analysis");
for tool in &[
"clippy",
"rustfmt",
"rust-analyzer",
"rust-docs",
"miri",
"rustc-codegen-cranelift",
] {
prepare("clippy");
prepare("rust-analyzer");
for tool in &["rust-docs", "miri", "rustc-codegen-cranelift"] {
if built_tools.contains(tool) {
prepare(tool);
}
@@ -1644,8 +1638,6 @@ fn filter(contents: &str, marker: &str) -> String {
"rust-analyzer-preview".to_string()
} else if name == "clippy" {
"clippy-preview".to_string()
} else if name == "rustfmt" {
"rustfmt-preview".to_string()
} else if name == "miri" {
"miri-preview".to_string()
} else if name == "rustc-codegen-cranelift" {
@@ -1665,7 +1657,7 @@ fn filter(contents: &str, marker: &str) -> String {
prepare("cargo");
prepare("rust-analysis");
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) {
prepare(tool);
}
@@ -1783,24 +1775,6 @@ fn filter(contents: &str, marker: &str) -> String {
.arg(etc.join("msi/remove-duplicates.xsl"))
.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") {
command(&heat)
.current_dir(&exe)
@@ -1872,9 +1846,6 @@ fn filter(contents: &str, marker: &str) -> String {
if built_tools.contains("clippy") {
cmd.arg("-dClippyDir=clippy");
}
if built_tools.contains("rustfmt") {
cmd.arg("-dRustFmtDir=rustfmt");
}
if built_tools.contains("rust-docs") {
cmd.arg("-dDocsDir=rust-docs");
}
@@ -1901,9 +1872,6 @@ fn filter(contents: &str, marker: &str) -> String {
if built_tools.contains("clippy") {
candle("ClippyGroup.wxs".as_ref());
}
if built_tools.contains("rustfmt") {
candle("RustFmtGroup.wxs".as_ref());
}
if built_tools.contains("miri") {
candle("MiriGroup.wxs".as_ref());
}
@@ -1942,9 +1910,6 @@ fn filter(contents: &str, marker: &str) -> String {
if built_tools.contains("clippy") {
cmd.arg("ClippyGroup.wixobj");
}
if built_tools.contains("rustfmt") {
cmd.arg("RustFmtGroup.wixobj");
}
if built_tools.contains("miri") {
cmd.arg("MiriGroup.wixobj");
}
+1 -1
View File
@@ -1 +1 @@
nightly
beta
+1 -40
View File
@@ -172,11 +172,6 @@
<!-- tool-rust-docs-end -->
<Directory Id="Cargo" 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>
@@ -284,41 +279,7 @@
<ComponentRef Id="PathEnvPerMachine" />
<ComponentRef Id="PathEnvPerUser" />
</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" />
</Product>
</Wix>
+6
View File
@@ -159,6 +159,9 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
.skipped_tests(vec![
// Fails because of linker errors, as of June 2023.
"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()?;
@@ -181,6 +184,9 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
.skipped_tests(vec![
// Fails as of June 2023.
"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()?;