update cfg(bootstrap)

This commit is contained in:
Pietro Albini 2025-05-10 10:51:12 +02:00
parent 2b7c13e778
commit 2ce08ca5d6
No known key found for this signature in database
GPG key ID: 3E06ABE80BAAF19C
73 changed files with 216 additions and 452 deletions

View file

@ -6,7 +6,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
test(attr(deny(warnings)))

View file

@ -32,7 +32,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![feature(box_patterns)]

View file

@ -4,7 +4,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(rust_logo)]
#![feature(box_patterns)]
#![feature(if_let_guard)]

View file

@ -1,6 +1,5 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
// tidy-alphabetical-end

View file

@ -77,7 +77,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
#![recursion_limit = "256"]

View file

@ -2,7 +2,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![feature(box_patterns)]

View file

@ -5,7 +5,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -6,7 +6,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -2,7 +2,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -1,7 +1,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![feature(box_patterns)]

View file

@ -7,7 +7,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(decl_macro)]

View file

@ -7,7 +7,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(array_windows)]

View file

@ -1,7 +1,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(rust_logo)]
#![feature(array_windows)]
#![feature(associated_type_defaults)]

View file

@ -25,9 +25,6 @@ fn invocation_relative_path_to_absolute(span: Span, path: &str) -> PathBuf {
path.to_path_buf()
} else {
// `/a/b/c/foo/bar.rs` contains the current macro invocation
#[cfg(bootstrap)]
let mut source_file_path = span.source_file().path();
#[cfg(not(bootstrap))]
let mut source_file_path = span.local_file().unwrap();
// `/a/b/c/foo/`
source_file_path.pop();

View file

@ -4,7 +4,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(associated_type_defaults)]
#![feature(box_patterns)]
#![feature(closure_track_caller)]

View file

@ -59,7 +59,6 @@ This API is completely unstable and subject to change.
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -2,7 +2,6 @@
//! the definitions in this file have equivalents in `rustc_ast_pretty`.
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(let_chains))]
#![recursion_limit = "256"]
// tidy-alphabetical-end

View file

@ -1,7 +1,6 @@
// tidy-alphabetical-start
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(array_windows)]
#![feature(box_patterns)]
#![feature(if_let_guard)]

View file

@ -16,7 +16,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -1,5 +1,4 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(decl_macro)]
#![feature(file_buffered)]
#![feature(iter_intersperse)]

View file

@ -21,7 +21,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(array_windows)]

View file

@ -1,6 +1,5 @@
// tidy-alphabetical-start
#![allow(rustc::default_hash_types)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(if_let_guard)]
#![feature(never_type)]
#![feature(proc_macro_diagnostic)]

View file

@ -1,6 +1,5 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(coroutines)]

View file

@ -28,7 +28,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(allocator_api)]

View file

@ -3,7 +3,6 @@
// tidy-alphabetical-start
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(assert_matches)]
#![feature(box_patterns)]
#![feature(if_let_guard)]

View file

@ -1,5 +1,4 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(assert_matches)]
#![feature(associated_type_defaults)]
#![feature(box_patterns)]

View file

@ -1,5 +1,4 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(array_windows)]
#![feature(assert_matches)]
#![feature(box_patterns)]

View file

@ -1,5 +1,4 @@
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(array_windows)]
#![feature(file_buffered)]
#![feature(if_let_guard)]

View file

@ -4,7 +4,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(assert_matches)]
#![feature(box_patterns)]
#![feature(debug_closure_helpers)]

View file

@ -6,7 +6,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(box_patterns)]

View file

@ -1,6 +1,5 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(associated_type_defaults)]

View file

@ -1,6 +1,5 @@
// tidy-alphabetical-start
#![allow(rustc::potential_query_instability, internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(assert_matches)]
#![feature(core_intrinsics)]
#![feature(dropck_eyepatch)]

View file

@ -10,7 +10,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -4,7 +4,6 @@
//! compiler.
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(let_chains))]
// tidy-alphabetical-end
pub mod cfi;

View file

@ -1,6 +1,5 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![feature(default_field_values)]
#![feature(iter_intersperse)]
#![feature(rustc_attrs)]

View file

@ -17,7 +17,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(array_windows)]

View file

@ -89,7 +89,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -9,7 +9,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -14,7 +14,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -6,7 +6,6 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(let_chains))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]

View file

@ -1832,7 +1832,7 @@ impl String {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
#[rustc_confusables("length", "size")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
pub const fn len(&self) -> usize {
self.vec.len()
}
@ -1852,7 +1852,7 @@ impl String {
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
pub const fn is_empty(&self) -> bool {
self.len() == 0
}

View file

@ -1,7 +1,7 @@
#![deny(warnings)]
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
#![allow(static_mut_refs)]
#![cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#![allow(unnecessary_transmutes)]
use std::cell::RefCell;
use std::fmt::{self, Write};

View file

@ -21,7 +21,7 @@ pub(super) const fn from_u32(i: u32) -> Option<char> {
/// Converts a `u32` to a `char`, ignoring validity. See [`char::from_u32_unchecked`].
#[inline]
#[must_use]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
// SAFETY: the caller must guarantee that `i` is a valid char value.
unsafe {
@ -222,7 +222,7 @@ impl FromStr for char {
}
#[inline]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
const fn char_try_from_u32(i: u32) -> Result<char, CharTryFromError> {
// This is an optimized version of the check
// (i > MAX as u32) || (i >= 0xD800 && i <= 0xDFFF),

View file

@ -19,14 +19,6 @@ pub struct Placeholder {
pub width: Count,
}
#[cfg(bootstrap)]
impl Placeholder {
#[inline]
pub const fn new(position: usize, flags: u32, precision: Count, width: Count) -> Self {
Self { position, flags, precision, width }
}
}
/// Used by [width](https://doc.rust-lang.org/std/fmt/#width)
/// and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
#[lang = "format_count"]

View file

@ -24,7 +24,6 @@ use crate::task::{Context, Poll};
/// are `Copy` get implicitly duplicated by the compiler, making it very
/// hard to predict when, and how often destructors will be executed. As such,
/// these types cannot have destructors.
#[cfg(not(bootstrap))]
#[unstable(feature = "async_drop", issue = "126482")]
#[lang = "async_drop"]
pub trait AsyncDrop {
@ -42,7 +41,6 @@ pub trait AsyncDrop {
}
/// Async drop.
#[cfg(not(bootstrap))]
#[unstable(feature = "async_drop", issue = "126482")]
#[lang = "async_drop_in_place"]
pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) {

View file

@ -20,7 +20,6 @@ mod pending;
mod poll_fn;
mod ready;
#[cfg(not(bootstrap))]
#[unstable(feature = "async_drop", issue = "126482")]
pub use async_drop::{AsyncDrop, async_drop_in_place};
#[stable(feature = "into_future", since = "1.64.0")]

View file

@ -1476,7 +1476,7 @@ pub const fn forget<T: ?Sized>(_: T);
/// Turning raw bytes (`[u8; SZ]`) into `u32`, `f64`, etc.:
///
/// ```
/// # #![cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
/// # #![allow(unnecessary_transmutes)]
/// let raw_bytes = [0x78, 0x56, 0x34, 0x12];
///
/// let num = unsafe {
@ -3413,7 +3413,6 @@ pub const fn contract_check_requires<C: Fn() -> bool + Copy>(cond: C) {
/// returns false.
///
/// Note that this function is a no-op during constant evaluation.
#[cfg(not(bootstrap))]
#[unstable(feature = "contracts_internals", issue = "128044")]
// Similar to `contract_check_requires`, we need to use the user-facing
// `contracts` feature rather than the perma-unstable `contracts_internals`.
@ -3437,16 +3436,6 @@ pub const fn contract_check_ensures<C: Fn(&Ret) -> bool + Copy, Ret>(cond: C, re
)
}
/// This is the old version of contract_check_ensures kept here for bootstrap only.
#[cfg(bootstrap)]
#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
#[rustc_intrinsic]
pub fn contract_check_ensures<'a, Ret, C: Fn(&'a Ret) -> bool>(ret: &'a Ret, cond: C) {
if contract_checks() && !cond(ret) {
crate::panicking::panic_nounwind("failed ensures check");
}
}
/// The intrinsic will return the size stored in that vtable.
///
/// # Safety

View file

@ -34,7 +34,7 @@ pub const unsafe fn simd_extract<T, U>(x: T, idx: u32) -> U;
///
/// `idx` must be in-bounds of the vector.
#[rustc_nounwind]
#[cfg_attr(not(bootstrap), rustc_intrinsic)]
#[rustc_intrinsic]
pub unsafe fn simd_insert_dyn<T, U>(mut x: T, idx: u32, val: U) -> T {
// SAFETY: `idx` must be in-bounds
unsafe { (&raw mut x).cast::<U>().add(idx as usize).write(val) }
@ -51,7 +51,7 @@ pub unsafe fn simd_insert_dyn<T, U>(mut x: T, idx: u32, val: U) -> T {
///
/// `idx` must be in-bounds of the vector.
#[rustc_nounwind]
#[cfg_attr(not(bootstrap), rustc_intrinsic)]
#[rustc_intrinsic]
pub unsafe fn simd_extract_dyn<T, U>(x: T, idx: u32) -> U {
// SAFETY: `idx` must be in-bounds
unsafe { (&raw const x).cast::<U>().add(idx as usize).read() }

View file

@ -885,8 +885,7 @@ marker_impls! {
///
/// This is part of [RFC 3467](https://rust-lang.github.io/rfcs/3467-unsafe-pinned.html), and is
/// tracked by [#125735](https://github.com/rust-lang/rust/issues/125735).
#[cfg_attr(not(bootstrap), lang = "unsafe_unpin")]
#[cfg_attr(bootstrap, allow(dead_code))]
#[lang = "unsafe_unpin"]
pub(crate) unsafe auto trait UnsafeUnpin {}
impl<T: ?Sized> !UnsafeUnpin for UnsafePinned<T> {}

View file

@ -893,7 +893,7 @@ impl f128 {
#[inline]
#[unstable(feature = "f128", issue = "116909")]
#[must_use = "this returns the result of the operation, without modifying the original"]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
pub const fn to_bits(self) -> u128 {
// SAFETY: `u128` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
@ -941,7 +941,7 @@ impl f128 {
#[inline]
#[must_use]
#[unstable(feature = "f128", issue = "116909")]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
pub const fn from_bits(v: u128) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u128` is a plain old datatype so we can always transmute from it.

View file

@ -881,7 +881,7 @@ impl f16 {
#[inline]
#[unstable(feature = "f16", issue = "116909")]
#[must_use = "this returns the result of the operation, without modifying the original"]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
pub const fn to_bits(self) -> u16 {
// SAFETY: `u16` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
@ -928,7 +928,7 @@ impl f16 {
#[inline]
#[must_use]
#[unstable(feature = "f16", issue = "116909")]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
pub const fn from_bits(v: u16) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u16` is a plain old datatype so we can always transmute from it.

View file

@ -1085,7 +1085,7 @@ impl f32 {
#[stable(feature = "float_bits_conv", since = "1.20.0")]
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
#[inline]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
pub const fn to_bits(self) -> u32 {
// SAFETY: `u32` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
@ -1131,7 +1131,7 @@ impl f32 {
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
#[must_use]
#[inline]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
pub const fn from_bits(v: u32) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u32` is a plain old datatype so we can always transmute from it.

View file

@ -1083,7 +1083,7 @@ impl f64 {
without modifying the original"]
#[stable(feature = "float_bits_conv", since = "1.20.0")]
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
#[inline]
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
@ -1130,7 +1130,7 @@ impl f64 {
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
#[must_use]
#[inline]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.

View file

@ -3675,7 +3675,7 @@ macro_rules! int_impl {
/// ```
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
// SAFETY: const sound because integers are plain old datatypes so we can always
// transmute them to arrays of bytes
#[must_use = "this returns the result of the operation, \
@ -3779,7 +3779,7 @@ macro_rules! int_impl {
/// ```
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
#[must_use]
// SAFETY: const sound because integers are plain old datatypes so we can always
// transmute to them

View file

@ -3523,7 +3523,7 @@ macro_rules! uint_impl {
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
// SAFETY: const sound because integers are plain old datatypes so we can always
// transmute them to arrays of bytes
#[inline]
@ -3625,7 +3625,7 @@ macro_rules! uint_impl {
/// ```
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[allow(unnecessary_transmutes)]
#[must_use]
// SAFETY: const sound because integers are plain old datatypes so we can always
// transmute to them

View file

@ -67,7 +67,7 @@ pub trait Index<Idx: ?Sized> {
///
/// May panic if the index is out of bounds.
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[track_caller]
fn index(&self, index: Idx) -> &Self::Output;
}
@ -172,7 +172,7 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
///
/// May panic if the index is out of bounds.
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[track_caller]
fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
}

View file

@ -206,7 +206,6 @@ pub mod panic_const {
}
// Separated panic constants list for async drop feature
// (May be joined when the corresponding lang items will be in the bootstrap)
#[cfg(not(bootstrap))]
panic_const! {
panic_const_coroutine_resumed_drop = "coroutine resumed after async drop",
panic_const_async_fn_resumed_drop = "`async fn` resumed after async drop",

View file

@ -1093,9 +1093,6 @@ pub use self::unsafe_pinned::UnsafePinned;
#[derive(Copy, Clone)]
pub struct Pin<Ptr> {
/// Only public for bootstrap.
#[cfg(bootstrap)]
pub pointer: Ptr,
#[cfg(not(bootstrap))]
pointer: Ptr,
}
@ -1936,7 +1933,6 @@ unsafe impl<T: ?Sized> PinCoerceUnsized for *mut T {}
/// constructor.
///
/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
#[cfg(not(bootstrap))]
#[stable(feature = "pin_macro", since = "1.68.0")]
#[rustc_macro_transparency = "semitransparent"]
#[allow_internal_unstable(super_let)]
@ -1947,11 +1943,3 @@ pub macro pin($value:expr $(,)?) {
unsafe { $crate::pin::Pin::new_unchecked(&mut pinned) }
}
}
/// Only for bootstrap.
#[cfg(bootstrap)]
#[stable(feature = "pin_macro", since = "1.68.0")]
#[rustc_macro_transparency = "semitransparent"]
pub macro pin($value:expr $(,)?) {
$crate::pin::Pin::<&mut _> { pointer: &mut { $value } }
}

View file

@ -21,7 +21,7 @@ use crate::{fmt, ptr};
/// Use `UnsafeCell` for that.
///
/// This type blocks niches the same way `UnsafeCell` does.
#[cfg_attr(not(bootstrap), lang = "unsafe_pinned")]
#[lang = "unsafe_pinned"]
#[repr(transparent)]
#[unstable(feature = "unsafe_pinned", issue = "125735")]
pub struct UnsafePinned<T: ?Sized> {

View file

@ -59,7 +59,6 @@ pub use crate::hash::macros::Hash;
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow(deprecated)]
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
#[doc(no_inline)]
pub use crate::{
assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,

View file

@ -109,7 +109,7 @@ impl<T> [T] {
#[lang = "slice_len_fn"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_slice_len", since = "1.39.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[inline]
#[must_use]
pub const fn len(&self) -> usize {
@ -129,7 +129,7 @@ impl<T> [T] {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_slice_is_empty", since = "1.39.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[inline]
#[must_use]
pub const fn is_empty(&self) -> bool {
@ -564,7 +564,7 @@ impl<T> [T] {
/// assert_eq!(None, v.get(0..4));
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[inline]
#[must_use]
pub fn get<I>(&self, index: I) -> Option<&I::Output>
@ -590,7 +590,7 @@ impl<T> [T] {
/// assert_eq!(x, &[0, 42, 2]);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[inline]
#[must_use]
pub fn get_mut<I>(&mut self, index: I) -> Option<&mut I::Output>
@ -628,7 +628,7 @@ impl<T> [T] {
/// }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[inline]
#[must_use]
pub unsafe fn get_unchecked<I>(&self, index: I) -> &I::Output
@ -671,7 +671,7 @@ impl<T> [T] {
/// assert_eq!(x, &[1, 13, 4]);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[inline]
#[must_use]
pub unsafe fn get_unchecked_mut<I>(&mut self, index: I) -> &mut I::Output

View file

@ -134,7 +134,7 @@ impl str {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_str_len", since = "1.39.0")]
#[rustc_diagnostic_item = "str_len"]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[must_use]
#[inline]
pub const fn len(&self) -> usize {
@ -154,7 +154,7 @@ impl str {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_str_is_empty", since = "1.39.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
#[rustc_no_implicit_autorefs]
#[must_use]
#[inline]
pub const fn is_empty(&self) -> bool {

View file

@ -38,7 +38,6 @@ fn rust_2024_expr() {
}
#[test]
#[cfg(not(bootstrap))]
fn temp_lifetime() {
// Check that temporary lifetimes work as in Rust 2021.
// Regression test for https://github.com/rust-lang/rust/issues/138596

View file

@ -22,10 +22,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = 3.7_f128;
@ -53,10 +52,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = 3.01_f128;
@ -84,10 +82,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = 3.3_f128;
@ -120,10 +117,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = 3.3_f128;
@ -154,10 +150,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = 3.7_f128;
@ -186,10 +181,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 3.6_f128;
@ -227,10 +221,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let m = 10.0_f128;
@ -275,10 +268,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let a: f128 = 7.0;
@ -321,10 +313,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let a: f128 = 7.0;
@ -362,10 +353,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 2.0_f128;
@ -394,10 +384,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 2.0_f128;
@ -430,10 +419,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let positive = 4.0_f128;
@ -465,10 +453,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let one = 1.0f128;
@ -500,10 +487,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = 2.0f128;
@ -535,10 +521,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let one = 1.0f128;
@ -555,10 +540,9 @@ impl f128 {
/// Non-positive values:
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// assert_eq!(0_f128.ln(), f128::NEG_INFINITY);
@ -590,10 +574,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let five = 5.0f128;
@ -608,10 +591,9 @@ impl f128 {
/// Non-positive values:
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// assert_eq!(0_f128.log(10.0), f128::NEG_INFINITY);
@ -639,10 +621,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let two = 2.0f128;
@ -657,10 +638,9 @@ impl f128 {
/// Non-positive values:
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// assert_eq!(0_f128.log2(), f128::NEG_INFINITY);
@ -688,10 +668,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let ten = 10.0f128;
@ -706,10 +685,9 @@ impl f128 {
/// Non-positive values:
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// assert_eq!(0_f128.log10(), f128::NEG_INFINITY);
@ -739,10 +717,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 8.0f128;
@ -779,10 +756,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 2.0f128;
@ -813,10 +789,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = std::f128::consts::FRAC_PI_2;
@ -845,10 +820,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 2.0 * std::f128::consts::PI;
@ -880,10 +854,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = std::f128::consts::FRAC_PI_4;
@ -916,10 +889,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = std::f128::consts::FRAC_PI_2;
@ -955,10 +927,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = std::f128::consts::FRAC_PI_4;
@ -993,10 +964,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let f = 1.0f128;
@ -1035,10 +1005,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// // Positive angles measured counter-clockwise
@ -1081,10 +1050,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = std::f128::consts::FRAC_PI_4;
@ -1120,10 +1088,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 1e-8_f128;
@ -1160,10 +1127,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 1e-8_f128;
@ -1179,10 +1145,9 @@ impl f128 {
/// Out-of-range values:
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// assert_eq!((-1.0_f128).ln_1p(), f128::NEG_INFINITY);
@ -1212,10 +1177,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let e = std::f128::consts::E;
@ -1251,10 +1215,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let e = std::f128::consts::E;
@ -1290,10 +1253,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let e = std::f128::consts::E;
@ -1326,10 +1288,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 1.0f128;
@ -1362,10 +1323,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 1.0f128;
@ -1400,10 +1360,9 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let e = std::f128::consts::E;
@ -1438,10 +1397,9 @@ impl f128 {
/// ```
/// #![feature(f128)]
/// #![feature(float_gamma)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 5.0f128;
@ -1477,10 +1435,9 @@ impl f128 {
/// ```
/// #![feature(f128)]
/// #![feature(float_gamma)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 2.0f128;
@ -1516,10 +1473,9 @@ impl f128 {
/// ```
/// #![feature(f128)]
/// #![feature(float_erf)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// /// The error function relates what percent of a normal distribution lies
/// /// within `x` standard deviations (scaled by `1/sqrt(2)`).
@ -1559,10 +1515,9 @@ impl f128 {
/// ```
/// #![feature(f128)]
/// #![feature(float_erf)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// let x: f128 = 0.123;
///

View file

@ -22,10 +22,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = 3.7_f16;
@ -53,10 +52,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = 3.01_f16;
@ -84,10 +82,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = 3.3_f16;
@ -120,10 +117,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = 3.3_f16;
@ -154,10 +150,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = 3.7_f16;
@ -186,10 +181,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 3.6_f16;
@ -227,10 +221,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let m = 10.0_f16;
@ -275,10 +268,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let a: f16 = 7.0;
@ -321,10 +313,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let a: f16 = 7.0;
@ -362,10 +353,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 2.0_f16;
@ -394,10 +384,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 2.0_f16;
@ -430,10 +419,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let positive = 4.0_f16;
@ -465,10 +453,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let one = 1.0f16;
@ -500,10 +487,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = 2.0f16;
@ -535,10 +521,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let one = 1.0f16;
@ -555,10 +540,9 @@ impl f16 {
/// Non-positive values:
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// assert_eq!(0_f16.ln(), f16::NEG_INFINITY);
@ -590,10 +574,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let five = 5.0f16;
@ -608,10 +591,9 @@ impl f16 {
/// Non-positive values:
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// assert_eq!(0_f16.log(10.0), f16::NEG_INFINITY);
@ -639,10 +621,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let two = 2.0f16;
@ -657,10 +638,9 @@ impl f16 {
/// Non-positive values:
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// assert_eq!(0_f16.log2(), f16::NEG_INFINITY);
@ -688,10 +668,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let ten = 10.0f16;
@ -706,10 +685,9 @@ impl f16 {
/// Non-positive values:
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// assert_eq!(0_f16.log10(), f16::NEG_INFINITY);
@ -738,10 +716,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 8.0f16;
@ -777,10 +754,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 2.0f16;
@ -811,10 +787,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = std::f16::consts::FRAC_PI_2;
@ -843,10 +818,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 2.0 * std::f16::consts::PI;
@ -878,10 +852,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = std::f16::consts::FRAC_PI_4;
@ -914,10 +887,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = std::f16::consts::FRAC_PI_2;
@ -953,10 +925,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = std::f16::consts::FRAC_PI_4;
@ -991,10 +962,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let f = 1.0f16;
@ -1033,10 +1003,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// // Positive angles measured counter-clockwise
@ -1079,10 +1048,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = std::f16::consts::FRAC_PI_4;
@ -1118,10 +1086,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 1e-4_f16;
@ -1158,10 +1125,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 1e-4_f16;
@ -1177,10 +1143,9 @@ impl f16 {
/// Out-of-range values:
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// assert_eq!((-1.0_f16).ln_1p(), f16::NEG_INFINITY);
@ -1210,10 +1175,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let e = std::f16::consts::E;
@ -1249,10 +1213,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let e = std::f16::consts::E;
@ -1288,10 +1251,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let e = std::f16::consts::E;
@ -1324,10 +1286,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 1.0f16;
@ -1360,10 +1321,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 1.0f16;
@ -1398,10 +1358,9 @@ impl f16 {
///
/// ```
/// #![feature(f16)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let e = std::f16::consts::E;
@ -1436,10 +1395,9 @@ impl f16 {
/// ```
/// #![feature(f16)]
/// #![feature(float_gamma)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 5.0f16;
@ -1475,10 +1433,9 @@ impl f16 {
/// ```
/// #![feature(f16)]
/// #![feature(float_gamma)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
///
/// let x = 2.0f16;
@ -1514,10 +1471,9 @@ impl f16 {
/// ```
/// #![feature(f16)]
/// #![feature(float_erf)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
/// /// The error function relates what percent of a normal distribution lies
/// /// within `x` standard deviations (scaled by `1/sqrt(2)`).
@ -1557,10 +1513,9 @@ impl f16 {
/// ```
/// #![feature(f16)]
/// #![feature(float_erf)]
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
/// # #![feature(cfg_target_has_reliable_f16_f128)]
/// # #![expect(internal_features)]
/// # #[cfg(not(miri))]
/// # #[cfg(not(bootstrap))]
/// # #[cfg(target_has_reliable_f16_math)] {
/// let x: f16 = 0.123;
///

View file

@ -48,7 +48,7 @@ use crate::{error, fmt, result, sys};
/// }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), doc(search_unbox))]
#[doc(search_unbox)]
pub type Result<T> = result::Result<T, Error>;
/// The error type for I/O operations of the [`Read`], [`Write`], [`Seek`], and

View file

@ -718,7 +718,6 @@ pub use core::todo;
// Re-export built-in macros defined through core.
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow(deprecated)]
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
pub use core::{
assert, assert_matches, cfg, column, compile_error, concat, concat_idents, const_format_args,
env, file, format_args, format_args_nl, include, include_bytes, include_str, line, log_syntax,

View file

@ -46,7 +46,6 @@ pub use crate::result::Result::{self, Err, Ok};
// Re-exported built-in macros
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow(deprecated)]
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
#[doc(no_inline)]
pub use core::prelude::v1::{
assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,

View file

@ -1676,7 +1676,7 @@ impl fmt::Debug for Thread {
/// [`Result`]: crate::result::Result
/// [`std::panic::resume_unwind`]: crate::panic::resume_unwind
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), doc(search_unbox))]
#[doc(search_unbox)]
pub type Result<T> = crate::result::Result<T, Box<dyn Any + Send + 'static>>;
// This packet is used to communicate the return value between the spawned

View file

@ -1,11 +1,9 @@
// FIXME(f16_f128): only tested on platforms that have symbols and aren't buggy
#![cfg(not(bootstrap))]
#![cfg(target_has_reliable_f128)]
use std::f128::consts;
use std::num::FpCategory as Fp;
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
use std::ops::Rem;
use std::ops::{Add, Div, Mul, Sub};
@ -23,7 +21,6 @@ const TOL: f128 = 1e-12;
/// Tolerances for math that is allowed to be imprecise, usually due to multiple chained
/// operations.
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
const TOL_IMPR: f128 = 1e-10;
@ -76,7 +73,6 @@ fn test_num_f128() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_num_f128_rem() {
let ten = 10f128;
@ -86,7 +82,6 @@ fn test_num_f128_rem() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_min_nan() {
assert_eq!(f128::NAN.min(2.0), 2.0);
@ -95,7 +90,6 @@ fn test_min_nan() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_max_nan() {
assert_eq!(f128::NAN.max(2.0), 2.0);
@ -104,7 +98,6 @@ fn test_max_nan() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_minimum() {
assert!(f128::NAN.minimum(2.0).is_nan());
@ -113,7 +106,6 @@ fn test_minimum() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_maximum() {
assert!(f128::NAN.maximum(2.0).is_nan());
@ -272,7 +264,6 @@ fn test_classify() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_floor() {
assert_approx_eq!(1.0f128.floor(), 1.0f128, TOL_PRECISE);
@ -289,7 +280,6 @@ fn test_floor() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_ceil() {
assert_approx_eq!(1.0f128.ceil(), 1.0f128, TOL_PRECISE);
@ -306,7 +296,6 @@ fn test_ceil() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_round() {
assert_approx_eq!(2.5f128.round(), 3.0f128, TOL_PRECISE);
@ -324,7 +313,6 @@ fn test_round() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_round_ties_even() {
assert_approx_eq!(2.5f128.round_ties_even(), 2.0f128, TOL_PRECISE);
@ -342,7 +330,6 @@ fn test_round_ties_even() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_trunc() {
assert_approx_eq!(1.0f128.trunc(), 1.0f128, TOL_PRECISE);
@ -359,7 +346,6 @@ fn test_trunc() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_fract() {
assert_approx_eq!(1.0f128.fract(), 0.0f128, TOL_PRECISE);
@ -376,7 +362,6 @@ fn test_fract() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_abs() {
assert_eq!(f128::INFINITY.abs(), f128::INFINITY);
@ -478,7 +463,6 @@ fn test_next_down() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_mul_add() {
let nan: f128 = f128::NAN;
@ -497,7 +481,6 @@ fn test_mul_add() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_recip() {
let nan: f128 = f128::NAN;
@ -521,7 +504,6 @@ fn test_recip() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_powi() {
let nan: f128 = f128::NAN;
@ -538,7 +520,6 @@ fn test_powi() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_powf() {
let nan: f128 = f128::NAN;
@ -557,7 +538,6 @@ fn test_powf() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_sqrt_domain() {
assert!(f128::NAN.sqrt().is_nan());
@ -571,7 +551,6 @@ fn test_sqrt_domain() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_exp() {
assert_eq!(1.0, 0.0f128.exp());
@ -588,7 +567,6 @@ fn test_exp() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_exp2() {
assert_eq!(32.0, 5.0f128.exp2());
@ -604,7 +582,6 @@ fn test_exp2() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_ln() {
let nan: f128 = f128::NAN;
@ -622,7 +599,6 @@ fn test_ln() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_log() {
let nan: f128 = f128::NAN;
@ -643,7 +619,6 @@ fn test_log() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_log2() {
let nan: f128 = f128::NAN;
@ -662,7 +637,6 @@ fn test_log2() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_log10() {
let nan: f128 = f128::NAN;
@ -714,7 +688,6 @@ fn test_to_radians() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_asinh() {
// Lower accuracy results are allowed, use increased tolerances
@ -747,7 +720,6 @@ fn test_asinh() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_acosh() {
assert_eq!(1.0f128.acosh(), 0.0f128);
@ -768,7 +740,6 @@ fn test_acosh() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_atanh() {
assert_eq!(0.0f128.atanh(), 0.0f128);
@ -790,7 +761,6 @@ fn test_atanh() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_gamma() {
// precision can differ among platforms
@ -813,7 +783,6 @@ fn test_gamma() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
fn test_ln_gamma() {
assert_approx_eq!(1.0f128.ln_gamma().0, 0.0f128, TOL_IMPR);
@ -846,7 +815,6 @@ fn test_real_consts() {
assert_approx_eq!(frac_2_pi, 2f128 / pi, TOL_PRECISE);
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f128_math)]
{
let frac_2_sqrtpi: f128 = consts::FRAC_2_SQRT_PI;

View file

@ -1,5 +1,4 @@
// FIXME(f16_f128): only tested on platforms that have symbols and aren't buggy
#![cfg(not(bootstrap))]
#![cfg(target_has_reliable_f16)]
use std::f16::consts;
@ -63,7 +62,6 @@ fn test_num_f16() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_min_nan() {
assert_eq!(f16::NAN.min(2.0), 2.0);
@ -72,7 +70,6 @@ fn test_min_nan() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_max_nan() {
assert_eq!(f16::NAN.max(2.0), 2.0);
@ -81,7 +78,6 @@ fn test_max_nan() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_minimum() {
assert!(f16::NAN.minimum(2.0).is_nan());
@ -90,7 +86,6 @@ fn test_minimum() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_maximum() {
assert!(f16::NAN.maximum(2.0).is_nan());
@ -249,7 +244,6 @@ fn test_classify() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_floor() {
assert_approx_eq!(1.0f16.floor(), 1.0f16, TOL_0);
@ -266,7 +260,6 @@ fn test_floor() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_ceil() {
assert_approx_eq!(1.0f16.ceil(), 1.0f16, TOL_0);
@ -283,7 +276,6 @@ fn test_ceil() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_round() {
assert_approx_eq!(2.5f16.round(), 3.0f16, TOL_0);
@ -301,7 +293,6 @@ fn test_round() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_round_ties_even() {
assert_approx_eq!(2.5f16.round_ties_even(), 2.0f16, TOL_0);
@ -319,7 +310,6 @@ fn test_round_ties_even() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_trunc() {
assert_approx_eq!(1.0f16.trunc(), 1.0f16, TOL_0);
@ -336,7 +326,6 @@ fn test_trunc() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_fract() {
assert_approx_eq!(1.0f16.fract(), 0.0f16, TOL_0);
@ -353,7 +342,6 @@ fn test_fract() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_abs() {
assert_eq!(f16::INFINITY.abs(), f16::INFINITY);
@ -455,7 +443,6 @@ fn test_next_down() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_mul_add() {
let nan: f16 = f16::NAN;
@ -474,7 +461,6 @@ fn test_mul_add() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_recip() {
let nan: f16 = f16::NAN;
@ -492,7 +478,6 @@ fn test_recip() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_powi() {
let nan: f16 = f16::NAN;
@ -509,7 +494,6 @@ fn test_powi() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_powf() {
let nan: f16 = f16::NAN;
@ -528,7 +512,6 @@ fn test_powf() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_sqrt_domain() {
assert!(f16::NAN.sqrt().is_nan());
@ -542,7 +525,6 @@ fn test_sqrt_domain() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_exp() {
assert_eq!(1.0, 0.0f16.exp());
@ -559,7 +541,6 @@ fn test_exp() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_exp2() {
assert_eq!(32.0, 5.0f16.exp2());
@ -575,7 +556,6 @@ fn test_exp2() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_ln() {
let nan: f16 = f16::NAN;
@ -593,7 +573,6 @@ fn test_ln() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_log() {
let nan: f16 = f16::NAN;
@ -614,7 +593,6 @@ fn test_log() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_log2() {
let nan: f16 = f16::NAN;
@ -633,7 +611,6 @@ fn test_log2() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_log10() {
let nan: f16 = f16::NAN;
@ -683,7 +660,6 @@ fn test_to_radians() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_asinh() {
assert_eq!(0.0f16.asinh(), 0.0f16);
@ -710,7 +686,6 @@ fn test_asinh() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_acosh() {
assert_eq!(1.0f16.acosh(), 0.0f16);
@ -731,7 +706,6 @@ fn test_acosh() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_atanh() {
assert_eq!(0.0f16.atanh(), 0.0f16);
@ -753,7 +727,6 @@ fn test_atanh() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_gamma() {
// precision can differ among platforms
@ -776,7 +749,6 @@ fn test_gamma() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_ln_gamma() {
assert_approx_eq!(1.0f16.ln_gamma().0, 0.0f16, TOL_0);
@ -811,7 +783,6 @@ fn test_real_consts() {
assert_approx_eq!(frac_2_pi, 2f16 / pi, TOL_0);
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
{
let frac_2_sqrtpi: f16 = consts::FRAC_2_SQRT_PI;
@ -874,7 +845,6 @@ fn test_clamp_max_is_nan() {
#[test]
#[cfg(not(miri))]
#[cfg(not(bootstrap))]
#[cfg(target_has_reliable_f16_math)]
fn test_total_cmp() {
use core::cmp::Ordering;

View file

@ -1,6 +1,6 @@
#![feature(f16, f128, float_algebraic, float_gamma, float_minimum_maximum)]
#![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
#![cfg_attr(not(bootstrap), expect(internal_features))] // for reliable_f16_f128
#![feature(cfg_target_has_reliable_f16_f128)]
#![expect(internal_features)] // for reliable_f16_f128
use std::fmt;
use std::ops::{Add, Div, Mul, Rem, Sub};

View file

@ -97,7 +97,6 @@ fn test_fn_like_macro_clone_raw_ident() {
}
#[test]
#[cfg(not(bootstrap))]
fn test_fn_like_fn_like_span_join() {
assert_expand(
"fn_like_span_join",
@ -112,7 +111,6 @@ fn test_fn_like_fn_like_span_join() {
}
#[test]
#[cfg(not(bootstrap))]
fn test_fn_like_fn_like_span_ops() {
assert_expand(
"fn_like_span_ops",