mirror of https://github.com/rust-lang/rust.git
step cfg(bootstrap)
This commit is contained in:
parent
fceb0863d8
commit
5eca36d27a
|
@ -5,7 +5,6 @@
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![allow(rustc::diagnostic_outside_of_impl)]
|
#![allow(rustc::diagnostic_outside_of_impl)]
|
||||||
#![allow(rustc::untranslatable_diagnostic)]
|
#![allow(rustc::untranslatable_diagnostic)]
|
||||||
#![cfg_attr(bootstrap, feature(lint_reasons))]
|
|
||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
|
|
|
@ -635,10 +635,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
|
||||||
trace!(
|
trace!(
|
||||||
"visit_projection_elem: place_ref={:?} elem={:?} \
|
"visit_projection_elem: place_ref={:?} elem={:?} \
|
||||||
context={:?} location={:?}",
|
context={:?} location={:?}",
|
||||||
place_ref,
|
place_ref, elem, context, location,
|
||||||
elem,
|
|
||||||
context,
|
|
||||||
location,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
self.super_projection_elem(place_ref, elem, context, location);
|
self.super_projection_elem(place_ref, elem, context, location);
|
||||||
|
|
|
@ -331,11 +331,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
|
||||||
) -> InterpResult<'tcx, ImmTy<'tcx, M::Provenance>> {
|
) -> InterpResult<'tcx, ImmTy<'tcx, M::Provenance>> {
|
||||||
trace!(
|
trace!(
|
||||||
"Running binary op {:?}: {:?} ({}), {:?} ({})",
|
"Running binary op {:?}: {:?} ({}), {:?} ({})",
|
||||||
bin_op,
|
bin_op, *left, left.layout.ty, *right, right.layout.ty
|
||||||
*left,
|
|
||||||
left.layout.ty,
|
|
||||||
*right,
|
|
||||||
right.layout.ty
|
|
||||||
);
|
);
|
||||||
|
|
||||||
match left.layout.ty.kind() {
|
match left.layout.ty.kind() {
|
||||||
|
|
|
@ -440,8 +440,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
|
||||||
} else {
|
} else {
|
||||||
trace!(
|
trace!(
|
||||||
"check_argument_compat: incompatible ABIs:\ncaller: {:?}\ncallee: {:?}",
|
"check_argument_compat: incompatible ABIs:\ncaller: {:?}\ncallee: {:?}",
|
||||||
caller_abi,
|
caller_abi, callee_abi
|
||||||
callee_abi
|
|
||||||
);
|
);
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![allow(rustc::default_hash_types)]
|
#![allow(rustc::default_hash_types)]
|
||||||
#![allow(rustc::potential_query_instability)]
|
#![allow(rustc::potential_query_instability)]
|
||||||
#![cfg_attr(bootstrap, feature(lint_reasons))]
|
|
||||||
#![cfg_attr(not(parallel_compiler), feature(cell_leak))]
|
#![cfg_attr(not(parallel_compiler), feature(cell_leak))]
|
||||||
#![deny(unsafe_op_in_unsafe_fn)]
|
#![deny(unsafe_op_in_unsafe_fn)]
|
||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
|
|
|
@ -616,8 +616,6 @@ declare_lint! {
|
||||||
/// ### Example
|
/// ### Example
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// #![cfg_attr(bootstrap, feature(lint_reasons))]
|
|
||||||
///
|
|
||||||
/// #[expect(unused_variables)]
|
/// #[expect(unused_variables)]
|
||||||
/// let x = 10;
|
/// let x = 10;
|
||||||
/// println!("{}", x);
|
/// println!("{}", x);
|
||||||
|
|
|
@ -554,12 +554,7 @@ pub(crate) enum MissingInInForLoopSub {
|
||||||
code = "in"
|
code = "in"
|
||||||
)]
|
)]
|
||||||
InNotOf(#[primary_span] Span),
|
InNotOf(#[primary_span] Span),
|
||||||
#[suggestion(
|
#[suggestion(parse_add_in, style = "verbose", applicability = "maybe-incorrect", code = " in ")]
|
||||||
parse_add_in,
|
|
||||||
style = "verbose",
|
|
||||||
applicability = "maybe-incorrect",
|
|
||||||
code = " in "
|
|
||||||
)]
|
|
||||||
AddIn(#[primary_span] Span),
|
AddIn(#[primary_span] Span),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1585,10 +1585,7 @@ pub enum TypeErrorAdditionalDiags {
|
||||||
span: Span,
|
span: Span,
|
||||||
code: String,
|
code: String,
|
||||||
},
|
},
|
||||||
#[multipart_suggestion(
|
#[multipart_suggestion(trait_selection_meant_str_literal, applicability = "machine-applicable")]
|
||||||
trait_selection_meant_str_literal,
|
|
||||||
applicability = "machine-applicable"
|
|
||||||
)]
|
|
||||||
MeantStrLiteral {
|
MeantStrLiteral {
|
||||||
#[suggestion_part(code = "\"")]
|
#[suggestion_part(code = "\"")]
|
||||||
start: Span,
|
start: Span,
|
||||||
|
|
|
@ -733,9 +733,7 @@ fn coroutine_saved_local_eligibility(
|
||||||
// point, so it is no longer a candidate.
|
// point, so it is no longer a candidate.
|
||||||
trace!(
|
trace!(
|
||||||
"removing local {:?} in >1 variant ({:?}, {:?})",
|
"removing local {:?} in >1 variant ({:?}, {:?})",
|
||||||
local,
|
local, variant_index, idx
|
||||||
variant_index,
|
|
||||||
idx
|
|
||||||
);
|
);
|
||||||
ineligible_locals.insert(*local);
|
ineligible_locals.insert(*local);
|
||||||
assignments[*local] = Ineligible(None);
|
assignments[*local] = Ineligible(None);
|
||||||
|
|
|
@ -165,7 +165,6 @@
|
||||||
//
|
//
|
||||||
// Language features:
|
// Language features:
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(c_unwind))]
|
|
||||||
#![cfg_attr(not(test), feature(coroutine_trait))]
|
#![cfg_attr(not(test), feature(coroutine_trait))]
|
||||||
#![cfg_attr(test, feature(panic_update_hook))]
|
#![cfg_attr(test, feature(panic_update_hook))]
|
||||||
#![cfg_attr(test, feature(test))]
|
#![cfg_attr(test, feature(test))]
|
||||||
|
|
|
@ -223,10 +223,7 @@ impl char {
|
||||||
/// assert_eq!('❤', c);
|
/// assert_eq!('❤', c);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "assoc_char_funcs", since = "1.52.0")]
|
#[stable(feature = "assoc_char_funcs", since = "1.52.0")]
|
||||||
#[rustc_const_stable(
|
#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "1.81.0")]
|
||||||
feature = "const_char_from_u32_unchecked",
|
|
||||||
since = "1.81.0"
|
|
||||||
)]
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const unsafe fn from_u32_unchecked(i: u32) -> char {
|
pub const unsafe fn from_u32_unchecked(i: u32) -> char {
|
||||||
|
|
|
@ -1017,45 +1017,6 @@ extern "rust-intrinsic" {
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
pub fn breakpoint();
|
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:
|
/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
|
||||||
/// This will statically either panic, or do nothing.
|
/// This will statically either panic, or do nothing.
|
||||||
///
|
///
|
||||||
|
@ -2385,12 +2346,6 @@ extern "rust-intrinsic" {
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
|
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
|
/// 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.
|
/// data pointer `data`, and calls `catch_fn` if unwinding occurs while `try_fn` runs.
|
||||||
///
|
///
|
||||||
|
@ -2768,7 +2723,6 @@ pub unsafe fn vtable_align(_ptr: *const ()) -> usize {
|
||||||
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
|
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
|
||||||
#[rustc_intrinsic]
|
#[rustc_intrinsic]
|
||||||
#[rustc_intrinsic_must_be_overridden]
|
#[rustc_intrinsic_must_be_overridden]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub const fn size_of<T>() -> usize {
|
pub const fn size_of<T>() -> usize {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
@ -2786,7 +2740,6 @@ pub const fn size_of<T>() -> usize {
|
||||||
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
|
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
|
||||||
#[rustc_intrinsic]
|
#[rustc_intrinsic]
|
||||||
#[rustc_intrinsic_must_be_overridden]
|
#[rustc_intrinsic_must_be_overridden]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub const fn min_align_of<T>() -> usize {
|
pub const fn min_align_of<T>() -> usize {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
@ -2800,7 +2753,6 @@ pub const fn min_align_of<T>() -> usize {
|
||||||
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
|
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
|
||||||
#[rustc_intrinsic]
|
#[rustc_intrinsic]
|
||||||
#[rustc_intrinsic_must_be_overridden]
|
#[rustc_intrinsic_must_be_overridden]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub const unsafe fn pref_align_of<T>() -> usize {
|
pub const unsafe fn pref_align_of<T>() -> usize {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
@ -2819,7 +2771,6 @@ pub const unsafe fn pref_align_of<T>() -> usize {
|
||||||
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
|
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
|
||||||
#[rustc_intrinsic]
|
#[rustc_intrinsic]
|
||||||
#[rustc_intrinsic_must_be_overridden]
|
#[rustc_intrinsic_must_be_overridden]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub const fn variant_count<T>() -> usize {
|
pub const fn variant_count<T>() -> usize {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
@ -2836,7 +2787,6 @@ pub const fn variant_count<T>() -> usize {
|
||||||
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
|
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
|
||||||
#[rustc_intrinsic]
|
#[rustc_intrinsic]
|
||||||
#[rustc_intrinsic_must_be_overridden]
|
#[rustc_intrinsic_must_be_overridden]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
|
pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
@ -2853,7 +2803,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_const_unstable(feature = "const_align_of_val", issue = "46571")]
|
||||||
#[rustc_intrinsic]
|
#[rustc_intrinsic]
|
||||||
#[rustc_intrinsic_must_be_overridden]
|
#[rustc_intrinsic_must_be_overridden]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
|
pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
@ -2871,7 +2820,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_const_unstable(feature = "const_type_name", issue = "63084")]
|
||||||
#[rustc_intrinsic]
|
#[rustc_intrinsic]
|
||||||
#[rustc_intrinsic_must_be_overridden]
|
#[rustc_intrinsic_must_be_overridden]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub const fn type_name<T: ?Sized>() -> &'static str {
|
pub const fn type_name<T: ?Sized>() -> &'static str {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
@ -2891,7 +2839,6 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
|
||||||
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
|
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
|
||||||
#[rustc_intrinsic]
|
#[rustc_intrinsic]
|
||||||
#[rustc_intrinsic_must_be_overridden]
|
#[rustc_intrinsic_must_be_overridden]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub const fn type_id<T: ?Sized + 'static>() -> u128 {
|
pub const fn type_id<T: ?Sized + 'static>() -> u128 {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,8 +192,6 @@
|
||||||
//
|
//
|
||||||
// Language features:
|
// Language features:
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(c_unwind))]
|
|
||||||
#![cfg_attr(bootstrap, feature(effects))]
|
|
||||||
#![feature(abi_unadjusted)]
|
#![feature(abi_unadjusted)]
|
||||||
#![feature(adt_const_params)]
|
#![feature(adt_const_params)]
|
||||||
#![feature(allow_internal_unsafe)]
|
#![feature(allow_internal_unsafe)]
|
||||||
|
|
|
@ -1061,7 +1061,6 @@ pub trait FnPtr: Copy + Clone {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Derive macro generating impls of traits related to smart pointers.
|
/// Derive macro generating impls of traits related to smart pointers.
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
|
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
|
||||||
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
|
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
|
||||||
|
@ -1079,7 +1078,6 @@ pub macro SmartPointer($item:item) {
|
||||||
reason = "internal module for implementing effects"
|
reason = "internal module for implementing effects"
|
||||||
)]
|
)]
|
||||||
#[allow(missing_debug_implementations)] // these unit structs don't need `Debug` impls.
|
#[allow(missing_debug_implementations)] // these unit structs don't need `Debug` impls.
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub mod effects {
|
pub mod effects {
|
||||||
#[lang = "EffectsNoRuntime"]
|
#[lang = "EffectsNoRuntime"]
|
||||||
pub struct NoRuntime;
|
pub struct NoRuntime;
|
||||||
|
|
|
@ -234,24 +234,20 @@ impl f128 {
|
||||||
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
|
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
|
||||||
/// and the stability of its representation over Rust versions
|
/// and the stability of its representation over Rust versions
|
||||||
/// and target platforms isn't guaranteed.
|
/// and target platforms isn't guaranteed.
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[allow(clippy::eq_op)]
|
#[allow(clippy::eq_op)]
|
||||||
#[rustc_diagnostic_item = "f128_nan"]
|
#[rustc_diagnostic_item = "f128_nan"]
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
pub const NAN: f128 = 0.0_f128 / 0.0_f128;
|
pub const NAN: f128 = 0.0_f128 / 0.0_f128;
|
||||||
|
|
||||||
/// Infinity (∞).
|
/// Infinity (∞).
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
pub const INFINITY: f128 = 1.0_f128 / 0.0_f128;
|
pub const INFINITY: f128 = 1.0_f128 / 0.0_f128;
|
||||||
|
|
||||||
/// Negative infinity (−∞).
|
/// Negative infinity (−∞).
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
pub const NEG_INFINITY: f128 = -1.0_f128 / 0.0_f128;
|
pub const NEG_INFINITY: f128 = -1.0_f128 / 0.0_f128;
|
||||||
|
|
||||||
/// Sign bit
|
/// Sign bit
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub(crate) const SIGN_MASK: u128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
|
pub(crate) const SIGN_MASK: u128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
|
||||||
|
|
||||||
/// Exponent mask
|
/// Exponent mask
|
||||||
|
@ -261,11 +257,9 @@ impl f128 {
|
||||||
pub(crate) const MAN_MASK: u128 = 0x0000_ffff_ffff_ffff_ffff_ffff_ffff_ffff;
|
pub(crate) const MAN_MASK: u128 = 0x0000_ffff_ffff_ffff_ffff_ffff_ffff_ffff;
|
||||||
|
|
||||||
/// Minimum representable positive value (min subnormal)
|
/// Minimum representable positive value (min subnormal)
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
const TINY_BITS: u128 = 0x1;
|
const TINY_BITS: u128 = 0x1;
|
||||||
|
|
||||||
/// Minimum representable negative value (min negative subnormal)
|
/// Minimum representable negative value (min negative subnormal)
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
const NEG_TINY_BITS: u128 = Self::TINY_BITS | Self::SIGN_MASK;
|
const NEG_TINY_BITS: u128 = Self::TINY_BITS | Self::SIGN_MASK;
|
||||||
|
|
||||||
/// Returns `true` if this value is NaN.
|
/// Returns `true` if this value is NaN.
|
||||||
|
@ -284,7 +278,6 @@ impl f128 {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
|
#[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 {
|
pub const fn is_nan(self) -> bool {
|
||||||
|
@ -295,7 +288,6 @@ impl f128 {
|
||||||
// concerns about portability, so this implementation is for
|
// concerns about portability, so this implementation is for
|
||||||
// private use internally.
|
// private use internally.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub(crate) const fn abs_private(self) -> f128 {
|
pub(crate) const fn abs_private(self) -> f128 {
|
||||||
// SAFETY: This transmutation is fine. Probably. For the reasons std is using it.
|
// SAFETY: This transmutation is fine. Probably. For the reasons std is using it.
|
||||||
|
@ -326,7 +318,6 @@ impl f128 {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn is_infinite(self) -> bool {
|
pub const fn is_infinite(self) -> bool {
|
||||||
|
@ -354,7 +345,6 @@ impl f128 {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn is_finite(self) -> bool {
|
pub const fn is_finite(self) -> bool {
|
||||||
|
@ -389,7 +379,6 @@ impl f128 {
|
||||||
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
|
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn is_subnormal(self) -> bool {
|
pub const fn is_subnormal(self) -> bool {
|
||||||
|
@ -422,7 +411,6 @@ impl f128 {
|
||||||
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
|
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn is_normal(self) -> bool {
|
pub const fn is_normal(self) -> bool {
|
||||||
|
@ -448,7 +436,6 @@ impl f128 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn classify(self) -> FpCategory {
|
pub const fn classify(self) -> FpCategory {
|
||||||
|
@ -557,7 +544,6 @@ impl f128 {
|
||||||
/// [`MIN`]: Self::MIN
|
/// [`MIN`]: Self::MIN
|
||||||
/// [`MAX`]: Self::MAX
|
/// [`MAX`]: Self::MAX
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
// #[unstable(feature = "float_next_up_down", issue = "91399")]
|
// #[unstable(feature = "float_next_up_down", issue = "91399")]
|
||||||
pub fn next_up(self) -> Self {
|
pub fn next_up(self) -> Self {
|
||||||
|
@ -612,7 +598,6 @@ impl f128 {
|
||||||
/// [`MIN`]: Self::MIN
|
/// [`MIN`]: Self::MIN
|
||||||
/// [`MAX`]: Self::MAX
|
/// [`MAX`]: Self::MAX
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
// #[unstable(feature = "float_next_up_down", issue = "91399")]
|
// #[unstable(feature = "float_next_up_down", issue = "91399")]
|
||||||
pub fn next_down(self) -> Self {
|
pub fn next_down(self) -> Self {
|
||||||
|
@ -649,7 +634,6 @@ impl f128 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[must_use = "this returns the result of the operation, without modifying the original"]
|
#[must_use = "this returns the result of the operation, without modifying the original"]
|
||||||
pub fn recip(self) -> Self {
|
pub fn recip(self) -> Self {
|
||||||
|
@ -670,7 +654,6 @@ impl f128 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[must_use = "this returns the result of the operation, without modifying the original"]
|
#[must_use = "this returns the result of the operation, without modifying the original"]
|
||||||
pub fn to_degrees(self) -> Self {
|
pub fn to_degrees(self) -> Self {
|
||||||
|
@ -694,7 +677,6 @@ impl f128 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[must_use = "this returns the result of the operation, without modifying the original"]
|
#[must_use = "this returns the result of the operation, without modifying the original"]
|
||||||
pub fn to_radians(self) -> f128 {
|
pub fn to_radians(self) -> f128 {
|
||||||
|
@ -1141,7 +1123,6 @@ impl f128 {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
|
pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
|
||||||
let mut left = self.to_bits() as i128;
|
let mut left = self.to_bits() as i128;
|
||||||
|
@ -1201,7 +1182,6 @@ impl f128 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[must_use = "method returns a new number and does not mutate the original value"]
|
#[must_use = "method returns a new number and does not mutate the original value"]
|
||||||
pub fn clamp(mut self, min: f128, max: f128) -> f128 {
|
pub fn clamp(mut self, min: f128, max: f128) -> f128 {
|
||||||
|
|
|
@ -229,24 +229,20 @@ impl f16 {
|
||||||
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
|
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
|
||||||
/// and the stability of its representation over Rust versions
|
/// and the stability of its representation over Rust versions
|
||||||
/// and target platforms isn't guaranteed.
|
/// and target platforms isn't guaranteed.
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[allow(clippy::eq_op)]
|
#[allow(clippy::eq_op)]
|
||||||
#[rustc_diagnostic_item = "f16_nan"]
|
#[rustc_diagnostic_item = "f16_nan"]
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
pub const NAN: f16 = 0.0_f16 / 0.0_f16;
|
pub const NAN: f16 = 0.0_f16 / 0.0_f16;
|
||||||
|
|
||||||
/// Infinity (∞).
|
/// Infinity (∞).
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
pub const INFINITY: f16 = 1.0_f16 / 0.0_f16;
|
pub const INFINITY: f16 = 1.0_f16 / 0.0_f16;
|
||||||
|
|
||||||
/// Negative infinity (−∞).
|
/// Negative infinity (−∞).
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
pub const NEG_INFINITY: f16 = -1.0_f16 / 0.0_f16;
|
pub const NEG_INFINITY: f16 = -1.0_f16 / 0.0_f16;
|
||||||
|
|
||||||
/// Sign bit
|
/// Sign bit
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub(crate) const SIGN_MASK: u16 = 0x8000;
|
pub(crate) const SIGN_MASK: u16 = 0x8000;
|
||||||
|
|
||||||
/// Exponent mask
|
/// Exponent mask
|
||||||
|
@ -256,11 +252,9 @@ impl f16 {
|
||||||
pub(crate) const MAN_MASK: u16 = 0x03ff;
|
pub(crate) const MAN_MASK: u16 = 0x03ff;
|
||||||
|
|
||||||
/// Minimum representable positive value (min subnormal)
|
/// Minimum representable positive value (min subnormal)
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
const TINY_BITS: u16 = 0x1;
|
const TINY_BITS: u16 = 0x1;
|
||||||
|
|
||||||
/// Minimum representable negative value (min negative subnormal)
|
/// Minimum representable negative value (min negative subnormal)
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
const NEG_TINY_BITS: u16 = Self::TINY_BITS | Self::SIGN_MASK;
|
const NEG_TINY_BITS: u16 = Self::TINY_BITS | Self::SIGN_MASK;
|
||||||
|
|
||||||
/// Returns `true` if this value is NaN.
|
/// Returns `true` if this value is NaN.
|
||||||
|
@ -278,7 +272,6 @@ impl f16 {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
|
#[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 {
|
pub const fn is_nan(self) -> bool {
|
||||||
|
@ -289,7 +282,6 @@ impl f16 {
|
||||||
// concerns about portability, so this implementation is for
|
// concerns about portability, so this implementation is for
|
||||||
// private use internally.
|
// private use internally.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub(crate) const fn abs_private(self) -> f16 {
|
pub(crate) const fn abs_private(self) -> f16 {
|
||||||
// SAFETY: This transmutation is fine. Probably. For the reasons std is using it.
|
// SAFETY: This transmutation is fine. Probably. For the reasons std is using it.
|
||||||
|
@ -317,7 +309,6 @@ impl f16 {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn is_infinite(self) -> bool {
|
pub const fn is_infinite(self) -> bool {
|
||||||
|
@ -344,7 +335,6 @@ impl f16 {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn is_finite(self) -> bool {
|
pub const fn is_finite(self) -> bool {
|
||||||
|
@ -377,7 +367,6 @@ impl f16 {
|
||||||
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
|
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn is_subnormal(self) -> bool {
|
pub const fn is_subnormal(self) -> bool {
|
||||||
|
@ -408,7 +397,6 @@ impl f16 {
|
||||||
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
|
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn is_normal(self) -> bool {
|
pub const fn is_normal(self) -> bool {
|
||||||
|
@ -433,7 +421,6 @@ impl f16 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
pub const fn classify(self) -> FpCategory {
|
pub const fn classify(self) -> FpCategory {
|
||||||
|
@ -478,7 +465,6 @@ impl f16 {
|
||||||
/// but getting floats correct is important for not accidentally leaking const eval
|
/// but getting floats correct is important for not accidentally leaking const eval
|
||||||
/// runtime-deviating logic which may or may not be acceptable.
|
/// runtime-deviating logic which may or may not be acceptable.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
|
||||||
const unsafe fn partial_classify(self) -> FpCategory {
|
const unsafe fn partial_classify(self) -> FpCategory {
|
||||||
// SAFETY: The caller is not asking questions for which this will tell lies.
|
// SAFETY: The caller is not asking questions for which this will tell lies.
|
||||||
|
@ -593,7 +579,6 @@ impl f16 {
|
||||||
/// [`MIN`]: Self::MIN
|
/// [`MIN`]: Self::MIN
|
||||||
/// [`MAX`]: Self::MAX
|
/// [`MAX`]: Self::MAX
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
// #[unstable(feature = "float_next_up_down", issue = "91399")]
|
// #[unstable(feature = "float_next_up_down", issue = "91399")]
|
||||||
pub fn next_up(self) -> Self {
|
pub fn next_up(self) -> Self {
|
||||||
|
@ -648,7 +633,6 @@ impl f16 {
|
||||||
/// [`MIN`]: Self::MIN
|
/// [`MIN`]: Self::MIN
|
||||||
/// [`MAX`]: Self::MAX
|
/// [`MAX`]: Self::MAX
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
// #[unstable(feature = "float_next_up_down", issue = "91399")]
|
// #[unstable(feature = "float_next_up_down", issue = "91399")]
|
||||||
pub fn next_down(self) -> Self {
|
pub fn next_down(self) -> Self {
|
||||||
|
@ -685,7 +669,6 @@ impl f16 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[must_use = "this returns the result of the operation, without modifying the original"]
|
#[must_use = "this returns the result of the operation, without modifying the original"]
|
||||||
pub fn recip(self) -> Self {
|
pub fn recip(self) -> Self {
|
||||||
|
@ -706,7 +689,6 @@ impl f16 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[must_use = "this returns the result of the operation, without modifying the original"]
|
#[must_use = "this returns the result of the operation, without modifying the original"]
|
||||||
pub fn to_degrees(self) -> Self {
|
pub fn to_degrees(self) -> Self {
|
||||||
|
@ -730,7 +712,6 @@ impl f16 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[must_use = "this returns the result of the operation, without modifying the original"]
|
#[must_use = "this returns the result of the operation, without modifying the original"]
|
||||||
pub fn to_radians(self) -> f16 {
|
pub fn to_radians(self) -> f16 {
|
||||||
|
@ -1167,7 +1148,6 @@ impl f16 {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
|
pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
|
||||||
let mut left = self.to_bits() as i16;
|
let mut left = self.to_bits() as i16;
|
||||||
|
@ -1226,7 +1206,6 @@ impl f16 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[must_use = "method returns a new number and does not mutate the original value"]
|
#[must_use = "method returns a new number and does not mutate the original value"]
|
||||||
pub fn clamp(mut self, min: f16, max: f16) -> f16 {
|
pub fn clamp(mut self, min: f16, max: f16) -> f16 {
|
||||||
|
|
|
@ -76,7 +76,7 @@ pub trait Coroutine<R = ()> {
|
||||||
/// values which are allowed to be returned each time a coroutine yields.
|
/// values which are allowed to be returned each time a coroutine yields.
|
||||||
/// For example an iterator-as-a-coroutine would likely have this type as
|
/// For example an iterator-as-a-coroutine would likely have this type as
|
||||||
/// `T`, the type being iterated over.
|
/// `T`, the type being iterated over.
|
||||||
#[cfg_attr(not(bootstrap), lang = "coroutine_yield")]
|
#[lang = "coroutine_yield"]
|
||||||
type Yield;
|
type Yield;
|
||||||
|
|
||||||
/// The type of value this coroutine returns.
|
/// The type of value this coroutine returns.
|
||||||
|
@ -85,7 +85,7 @@ pub trait Coroutine<R = ()> {
|
||||||
/// `return` statement or implicitly as the last expression of a coroutine
|
/// `return` statement or implicitly as the last expression of a coroutine
|
||||||
/// literal. For example futures would use this as `Result<T, E>` as it
|
/// literal. For example futures would use this as `Result<T, E>` as it
|
||||||
/// represents a completed future.
|
/// represents a completed future.
|
||||||
#[cfg_attr(not(bootstrap), lang = "coroutine_return")]
|
#[lang = "coroutine_return"]
|
||||||
type Return;
|
type Return;
|
||||||
|
|
||||||
/// Resumes the execution of this coroutine.
|
/// Resumes the execution of this coroutine.
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#![feature(std_internals)]
|
#![feature(std_internals)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![cfg_attr(bootstrap, feature(c_unwind))]
|
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
|
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![panic_runtime]
|
#![panic_runtime]
|
||||||
#![feature(panic_runtime)]
|
#![feature(panic_runtime)]
|
||||||
#![cfg_attr(bootstrap, feature(c_unwind))]
|
|
||||||
// `real_imp` is unused with Miri, so silence warnings.
|
// `real_imp` is unused with Miri, so silence warnings.
|
||||||
#![cfg_attr(miri, allow(dead_code))]
|
#![cfg_attr(miri, allow(dead_code))]
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
|
|
|
@ -53,7 +53,6 @@ impl f128 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[rustc_allow_incoherent_impl]
|
#[rustc_allow_incoherent_impl]
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[must_use = "method returns a new number and does not mutate the original value"]
|
#[must_use = "method returns a new number and does not mutate the original value"]
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#![cfg(not(bootstrap))]
|
|
||||||
// FIXME(f16_f128): only tested on platforms that have symbols and aren't buggy
|
// FIXME(f16_f128): only tested on platforms that have symbols and aren't buggy
|
||||||
#![cfg(reliable_f128)]
|
#![cfg(reliable_f128)]
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@ impl f16 {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[rustc_allow_incoherent_impl]
|
#[rustc_allow_incoherent_impl]
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[must_use = "method returns a new number and does not mutate the original value"]
|
#[must_use = "method returns a new number and does not mutate the original value"]
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#![cfg(not(bootstrap))]
|
|
||||||
// FIXME(f16_f128): only tested on platforms that have symbols and aren't buggy
|
// FIXME(f16_f128): only tested on platforms that have symbols and aren't buggy
|
||||||
#![cfg(reliable_f16)]
|
#![cfg(reliable_f16)]
|
||||||
|
|
||||||
|
|
|
@ -275,7 +275,6 @@
|
||||||
//
|
//
|
||||||
// Language features:
|
// Language features:
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(c_unwind))]
|
|
||||||
#![feature(alloc_error_handler)]
|
#![feature(alloc_error_handler)]
|
||||||
#![feature(allocator_internals)]
|
#![feature(allocator_internals)]
|
||||||
#![feature(allow_internal_unsafe)]
|
#![feature(allow_internal_unsafe)]
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#![unstable(feature = "panic_unwind", issue = "32837")]
|
#![unstable(feature = "panic_unwind", issue = "32837")]
|
||||||
#![feature(link_cfg)]
|
#![feature(link_cfg)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![cfg_attr(bootstrap, feature(c_unwind))]
|
|
||||||
#![feature(strict_provenance)]
|
#![feature(strict_provenance)]
|
||||||
#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
|
#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
|
||||||
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
|
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
|
||||||
|
|
|
@ -22,8 +22,6 @@ ignore = [
|
||||||
"/tests/rustdoc-ui/", # Some have syntax errors, some are whitespace-sensitive.
|
"/tests/rustdoc-ui/", # Some have syntax errors, some are whitespace-sensitive.
|
||||||
"/tests/ui/", # Some have syntax errors, some are whitespace-sensitive.
|
"/tests/ui/", # Some have syntax errors, some are whitespace-sensitive.
|
||||||
"/tests/ui-fulldeps/", # Some are whitespace-sensitive (e.g. `// ~ERROR` comments).
|
"/tests/ui-fulldeps/", # Some are whitespace-sensitive (e.g. `// ~ERROR` comments).
|
||||||
# #[cfg(bootstrap)] so that t-release sees this when they search for it
|
|
||||||
"/tests/rustdoc-json/impl-trait-precise-capturing.rs",
|
|
||||||
|
|
||||||
# Do not format submodules.
|
# Do not format submodules.
|
||||||
# FIXME: sync submodule list with tidy/bootstrap/etc
|
# FIXME: sync submodule list with tidy/bootstrap/etc
|
||||||
|
|
|
@ -30,10 +30,7 @@ fn main() {
|
||||||
// Display PID of process holding the lock
|
// Display PID of process holding the lock
|
||||||
// PID will be stored in a lock file
|
// PID will be stored in a lock file
|
||||||
let lock_path = config.out.join("lock");
|
let lock_path = config.out.join("lock");
|
||||||
let pid = match fs::read_to_string(&lock_path) {
|
let pid = fs::read_to_string(&lock_path).unwrap_or_default();
|
||||||
Ok(contents) => contents,
|
|
||||||
Err(_) => String::new(),
|
|
||||||
};
|
|
||||||
|
|
||||||
build_lock = fd_lock::RwLock::new(t!(fs::OpenOptions::new()
|
build_lock = fd_lock::RwLock::new(t!(fs::OpenOptions::new()
|
||||||
.write(true)
|
.write(true)
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#![feature(iter_intersperse)]
|
#![feature(iter_intersperse)]
|
||||||
#![feature(iter_partition_in_place)]
|
#![feature(iter_partition_in_place)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![cfg_attr(bootstrap, feature(lint_reasons))]
|
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![feature(stmt_expr_attributes)]
|
#![feature(stmt_expr_attributes)]
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#![feature(f16)]
|
#![feature(f16)]
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![cfg_attr(bootstrap, feature(lint_reasons))]
|
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#![allow(rustc::untranslatable_diagnostic)]
|
#![allow(rustc::untranslatable_diagnostic)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![cfg_attr(bootstrap, feature(lint_reasons))]
|
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#![feature(yeet_expr)]
|
#![feature(yeet_expr)]
|
||||||
#![feature(nonzero_ops)]
|
#![feature(nonzero_ops)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![cfg_attr(bootstrap, feature(lint_reasons))]
|
|
||||||
#![feature(trait_upcasting)]
|
#![feature(trait_upcasting)]
|
||||||
#![feature(strict_overflow_ops)]
|
#![feature(strict_overflow_ops)]
|
||||||
#![feature(is_none_or)]
|
#![feature(is_none_or)]
|
||||||
|
|
|
@ -5,6 +5,7 @@ trait MyDatabase: salsa::Database {
|
||||||
}
|
}
|
||||||
|
|
||||||
mod another_module {
|
mod another_module {
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) fn another_name(_: &dyn crate::MyDatabase, (): ()) {}
|
pub(crate) fn another_name(_: &dyn crate::MyDatabase, (): ()) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//@ compile-flags: -Z unstable-options
|
//@ compile-flags: -Z unstable-options
|
||||||
//@ ignore-stage1 (can be removed after beta bump, #[cfg(bootstrap)])
|
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![deny(rustc::non_glob_import_of_type_ir_inherent)]
|
#![deny(rustc::non_glob_import_of_type_ir_inherent)]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue