Skip to content

Commit

Permalink
Auto merge of rust-lang#128083 - Mark-Simulacrum:bump-bootstrap, r=al…
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Jul 30, 2024
2 parents 440ec83 + abc611f commit ddff2b6
Show file tree
Hide file tree
Showing 27 changed files with 25 additions and 135 deletions.
1 change: 0 additions & 1 deletion alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
//
// Language features:
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(c_unwind))]
#![cfg_attr(not(test), feature(coroutine_trait))]
#![cfg_attr(test, feature(panic_update_hook))]
#![cfg_attr(test, feature(test))]
Expand Down
5 changes: 1 addition & 4 deletions core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ impl char {
/// assert_eq!('❤', c);
/// ```
#[stable(feature = "assoc_char_funcs", since = "1.52.0")]
#[rustc_const_stable(
feature = "const_char_from_u32_unchecked",
since = "CURRENT_RUSTC_VERSION"
)]
#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "1.81.0")]
#[must_use]
#[inline]
pub const unsafe fn from_u32_unchecked(i: u32) -> char {
Expand Down
2 changes: 1 addition & 1 deletion core/src/char/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub const fn from_u32(i: u32) -> Option<char> {
/// Converts a `u32` to a `char`, ignoring validity. Use [`char::from_u32_unchecked`].
/// instead.
#[stable(feature = "char_from_unchecked", since = "1.5.0")]
#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "1.81.0")]
#[must_use]
#[inline]
pub const unsafe fn from_u32_unchecked(i: u32) -> char {
Expand Down
2 changes: 1 addition & 1 deletion core/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![doc = include_str!("error.md")]
#![stable(feature = "error_in_core", since = "CURRENT_RUSTC_VERSION")]
#![stable(feature = "error_in_core", since = "1.81.0")]

#[cfg(test)]
mod tests;
Expand Down
6 changes: 3 additions & 3 deletions core/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl CStr {
#[inline] // inline is necessary for codegen to see strlen.
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "1.81.0")]
pub const unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr {
// SAFETY: The caller has provided a pointer that points to a valid C
// string with a NUL terminator less than `isize::MAX` from `ptr`.
Expand Down Expand Up @@ -534,7 +534,7 @@ impl CStr {
#[must_use]
#[doc(alias("len", "strlen"))]
#[stable(feature = "cstr_count_bytes", since = "1.79.0")]
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "1.81.0")]
pub const fn count_bytes(&self) -> usize {
self.inner.len() - 1
}
Expand Down Expand Up @@ -729,7 +729,7 @@ impl AsRef<CStr> for CStr {
/// located within `isize::MAX` from `ptr`.
#[inline]
#[unstable(feature = "cstr_internals", issue = "none")]
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "1.81.0")]
#[rustc_allow_const_fn_unstable(const_eval_select)]
const unsafe fn strlen(ptr: *const c_char) -> usize {
const fn strlen_ct(s: *const c_char) -> usize {
Expand Down
4 changes: 2 additions & 2 deletions core/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ pub const unsafe fn unreachable_unchecked() -> ! {
#[track_caller]
#[inline(always)]
#[doc(alias = "assume")]
#[stable(feature = "hint_assert_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "hint_assert_unchecked", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "hint_assert_unchecked", since = "1.81.0")]
#[rustc_const_stable(feature = "hint_assert_unchecked", since = "1.81.0")]
pub const unsafe fn assert_unchecked(cond: bool) {
// SAFETY: The caller promised `cond` is true.
unsafe {
Expand Down
53 changes: 0 additions & 53 deletions core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,45 +1043,6 @@ extern "rust-intrinsic" {
#[rustc_nounwind]
pub fn breakpoint();

#[cfg(bootstrap)]
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn size_of<T>() -> usize;

#[cfg(bootstrap)]
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn min_align_of<T>() -> usize;

#[cfg(bootstrap)]
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
#[rustc_nounwind]
pub fn pref_align_of<T>() -> usize;

#[cfg(bootstrap)]
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
#[rustc_nounwind]
pub fn size_of_val<T: ?Sized>(_: *const T) -> usize;

#[cfg(bootstrap)]
#[rustc_const_unstable(feature = "const_align_of_val", issue = "46571")]
#[rustc_nounwind]
pub fn min_align_of_val<T: ?Sized>(_: *const T) -> usize;

#[cfg(bootstrap)]
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn type_name<T: ?Sized>() -> &'static str;

#[cfg(bootstrap)]
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn type_id<T: ?Sized + 'static>() -> u128;

/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
/// This will statically either panic, or do nothing.
///
Expand Down Expand Up @@ -2411,12 +2372,6 @@ extern "rust-intrinsic" {
#[rustc_nounwind]
pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;

#[cfg(bootstrap)]
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
#[rustc_safe_intrinsic]
#[rustc_nounwind]
pub fn variant_count<T>() -> usize;

/// Rust's "try catch" construct for unwinding. Invokes the function pointer `try_fn` with the
/// data pointer `data`, and calls `catch_fn` if unwinding occurs while `try_fn` runs.
///
Expand Down Expand Up @@ -2794,7 +2749,6 @@ pub unsafe fn vtable_align(_ptr: *const ()) -> usize {
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[cfg(not(bootstrap))]
pub const fn size_of<T>() -> usize {
unreachable!()
}
Expand All @@ -2812,7 +2766,6 @@ pub const fn size_of<T>() -> usize {
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[cfg(not(bootstrap))]
pub const fn min_align_of<T>() -> usize {
unreachable!()
}
Expand All @@ -2826,7 +2779,6 @@ pub const fn min_align_of<T>() -> usize {
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[cfg(not(bootstrap))]
pub const unsafe fn pref_align_of<T>() -> usize {
unreachable!()
}
Expand All @@ -2845,7 +2797,6 @@ pub const unsafe fn pref_align_of<T>() -> usize {
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[cfg(not(bootstrap))]
pub const fn variant_count<T>() -> usize {
unreachable!()
}
Expand All @@ -2862,7 +2813,6 @@ pub const fn variant_count<T>() -> usize {
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[cfg(not(bootstrap))]
pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
unreachable!()
}
Expand All @@ -2879,7 +2829,6 @@ pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
#[rustc_const_unstable(feature = "const_align_of_val", issue = "46571")]
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[cfg(not(bootstrap))]
pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
unreachable!()
}
Expand All @@ -2897,7 +2846,6 @@ pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[cfg(not(bootstrap))]
pub const fn type_name<T: ?Sized>() -> &'static str {
unreachable!()
}
Expand All @@ -2917,7 +2865,6 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
#[rustc_intrinsic]
#[rustc_intrinsic_must_be_overridden]
#[cfg(not(bootstrap))]
pub const fn type_id<T: ?Sized + 'static>() -> u128 {
unreachable!()
}
Expand Down
2 changes: 0 additions & 2 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@
//
// Language features:
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(c_unwind))]
#![cfg_attr(bootstrap, feature(effects))]
#![feature(abi_unadjusted)]
#![feature(adt_const_params)]
#![feature(allow_internal_unsafe)]
Expand Down
2 changes: 0 additions & 2 deletions core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,6 @@ pub trait FnPtr: Copy + Clone {
}

/// Derive macro generating impls of traits related to smart pointers.
#[cfg(not(bootstrap))]
#[rustc_builtin_macro]
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
Expand All @@ -1078,7 +1077,6 @@ pub macro SmartPointer($item:item) {
reason = "internal module for implementing effects"
)]
#[allow(missing_debug_implementations)] // these unit structs don't need `Debug` impls.
#[cfg(not(bootstrap))]
pub mod effects {
#[lang = "EffectsNoRuntime"]
pub struct NoRuntime;
Expand Down
20 changes: 0 additions & 20 deletions core/src/num/f128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,24 +234,20 @@ impl f128 {
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
/// and the stability of its representation over Rust versions
/// and target platforms isn't guaranteed.
#[cfg(not(bootstrap))]
#[allow(clippy::eq_op)]
#[rustc_diagnostic_item = "f128_nan"]
#[unstable(feature = "f128", issue = "116909")]
pub const NAN: f128 = 0.0_f128 / 0.0_f128;

/// Infinity (∞).
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
pub const INFINITY: f128 = 1.0_f128 / 0.0_f128;

/// Negative infinity (−∞).
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
pub const NEG_INFINITY: f128 = -1.0_f128 / 0.0_f128;

/// Sign bit
#[cfg(not(bootstrap))]
pub(crate) const SIGN_MASK: u128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;

/// Exponent mask
Expand All @@ -261,11 +257,9 @@ impl f128 {
pub(crate) const MAN_MASK: u128 = 0x0000_ffff_ffff_ffff_ffff_ffff_ffff_ffff;

/// Minimum representable positive value (min subnormal)
#[cfg(not(bootstrap))]
const TINY_BITS: u128 = 0x1;

/// Minimum representable negative value (min negative subnormal)
#[cfg(not(bootstrap))]
const NEG_TINY_BITS: u128 = Self::TINY_BITS | Self::SIGN_MASK;

/// Returns `true` if this value is NaN.
Expand All @@ -284,7 +278,6 @@ impl f128 {
/// ```
#[inline]
#[must_use]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
pub const fn is_nan(self) -> bool {
Expand All @@ -295,7 +288,6 @@ impl f128 {
// concerns about portability, so this implementation is for
// private use internally.
#[inline]
#[cfg(not(bootstrap))]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
pub(crate) const fn abs_private(self) -> f128 {
// SAFETY: This transmutation is fine. Probably. For the reasons std is using it.
Expand Down Expand Up @@ -326,7 +318,6 @@ impl f128 {
/// ```
#[inline]
#[must_use]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
pub const fn is_infinite(self) -> bool {
Expand Down Expand Up @@ -354,7 +345,6 @@ impl f128 {
/// ```
#[inline]
#[must_use]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
pub const fn is_finite(self) -> bool {
Expand Down Expand Up @@ -389,7 +379,6 @@ impl f128 {
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
#[inline]
#[must_use]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
pub const fn is_subnormal(self) -> bool {
Expand Down Expand Up @@ -422,7 +411,6 @@ impl f128 {
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
#[inline]
#[must_use]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
pub const fn is_normal(self) -> bool {
Expand All @@ -448,7 +436,6 @@ impl f128 {
/// # }
/// ```
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
pub const fn classify(self) -> FpCategory {
Expand Down Expand Up @@ -557,7 +544,6 @@ impl f128 {
/// [`MIN`]: Self::MIN
/// [`MAX`]: Self::MAX
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
// #[unstable(feature = "float_next_up_down", issue = "91399")]
pub fn next_up(self) -> Self {
Expand Down Expand Up @@ -612,7 +598,6 @@ impl f128 {
/// [`MIN`]: Self::MIN
/// [`MAX`]: Self::MAX
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
// #[unstable(feature = "float_next_up_down", issue = "91399")]
pub fn next_down(self) -> Self {
Expand Down Expand Up @@ -649,7 +634,6 @@ impl f128 {
/// # }
/// ```
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[must_use = "this returns the result of the operation, without modifying the original"]
pub fn recip(self) -> Self {
Expand All @@ -670,7 +654,6 @@ impl f128 {
/// # }
/// ```
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[must_use = "this returns the result of the operation, without modifying the original"]
pub fn to_degrees(self) -> Self {
Expand All @@ -694,7 +677,6 @@ impl f128 {
/// # }
/// ```
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[must_use = "this returns the result of the operation, without modifying the original"]
pub fn to_radians(self) -> f128 {
Expand Down Expand Up @@ -1141,7 +1123,6 @@ impl f128 {
/// ```
#[inline]
#[must_use]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
let mut left = self.to_bits() as i128;
Expand Down Expand Up @@ -1201,7 +1182,6 @@ impl f128 {
/// # }
/// ```
#[inline]
#[cfg(not(bootstrap))]
#[unstable(feature = "f128", issue = "116909")]
#[must_use = "method returns a new number and does not mutate the original value"]
pub fn clamp(mut self, min: f128, max: f128) -> f128 {
Expand Down
Loading

0 comments on commit ddff2b6

Please sign in to comment.