Auto merge of #140887 - pietroalbini:pa-bootstrap-update, r=compiler-errors
Stage0 bootstrap update
This PR [follows the release process](https://forge.rust-lang.org/release/process.html#master-bootstrap-update-tuesday) to update the stage0 compiler.
The only thing of note is 58651d1b31, which was flagged by clippy as a correctness fix. I think allowing that lint in our case makes sense, but it's worth to have a second pair of eyes on it.
r? `@Mark-Simulacrum`
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![doc(
|
#![doc(
|
||||||
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
|
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
|
||||||
test(attr(deny(warnings)))
|
test(attr(deny(warnings)))
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(rustdoc_internals)]
|
#![feature(rustdoc_internals)]
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
|
|||||||
@@ -77,7 +77,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(rustdoc_internals)]
|
#![feature(rustdoc_internals)]
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
|
|||||||
@@ -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(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -2,7 +2,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(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![allow(rustc::diagnostic_outside_of_impl)]
|
#![allow(rustc::diagnostic_outside_of_impl)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
|
#![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(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(decl_macro)]
|
#![feature(decl_macro)]
|
||||||
|
|||||||
@@ -7,7 +7,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(let_chains))]
|
|
||||||
#![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(array_windows)]
|
#![feature(array_windows)]
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![allow(rustc::diagnostic_outside_of_impl)]
|
#![allow(rustc::diagnostic_outside_of_impl)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![doc(rust_logo)]
|
#![doc(rust_logo)]
|
||||||
#![feature(array_windows)]
|
#![feature(array_windows)]
|
||||||
#![feature(associated_type_defaults)]
|
#![feature(associated_type_defaults)]
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ declare_features! (
|
|||||||
/// Allows `#[cfg_attr(predicate, multiple, attributes, here)]`.
|
/// Allows `#[cfg_attr(predicate, multiple, attributes, here)]`.
|
||||||
(accepted, cfg_attr_multi, "1.33.0", Some(54881)),
|
(accepted, cfg_attr_multi, "1.33.0", Some(54881)),
|
||||||
/// Allows the use of `#[cfg(<true/false>)]`.
|
/// Allows the use of `#[cfg(<true/false>)]`.
|
||||||
(accepted, cfg_boolean_literals, "CURRENT_RUSTC_VERSION", Some(131204)),
|
(accepted, cfg_boolean_literals, "1.88.0", Some(131204)),
|
||||||
/// Allows the use of `#[cfg(doctest)]`, set when rustdoc is collecting doctests.
|
/// Allows the use of `#[cfg(doctest)]`, set when rustdoc is collecting doctests.
|
||||||
(accepted, cfg_doctest, "1.40.0", Some(62210)),
|
(accepted, cfg_doctest, "1.40.0", Some(62210)),
|
||||||
/// Enables `#[cfg(panic = "...")]` config key.
|
/// Enables `#[cfg(panic = "...")]` config key.
|
||||||
@@ -301,7 +301,7 @@ declare_features! (
|
|||||||
/// For example, you can write `Foo(a, ref b)` where `a` is by-move and `b` is by-ref.
|
/// For example, you can write `Foo(a, ref b)` where `a` is by-move and `b` is by-ref.
|
||||||
(accepted, move_ref_pattern, "1.49.0", Some(68354)),
|
(accepted, move_ref_pattern, "1.49.0", Some(68354)),
|
||||||
/// Allows using `#[naked]` on functions.
|
/// Allows using `#[naked]` on functions.
|
||||||
(accepted, naked_functions, "CURRENT_RUSTC_VERSION", Some(90957)),
|
(accepted, naked_functions, "1.88.0", Some(90957)),
|
||||||
/// Allows specifying modifiers in the link attribute: `#[link(modifiers = "...")]`
|
/// Allows specifying modifiers in the link attribute: `#[link(modifiers = "...")]`
|
||||||
(accepted, native_link_modifiers, "1.61.0", Some(81490)),
|
(accepted, native_link_modifiers, "1.61.0", Some(81490)),
|
||||||
/// Allows specifying the bundle link modifier
|
/// Allows specifying the bundle link modifier
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ declare_features! (
|
|||||||
(removed, infer_static_outlives_requirements, "1.63.0", Some(54185),
|
(removed, infer_static_outlives_requirements, "1.63.0", Some(54185),
|
||||||
Some("removed as it caused some confusion and discussion was inactive for years")),
|
Some("removed as it caused some confusion and discussion was inactive for years")),
|
||||||
/// Allow anonymous constants from an inline `const` block in pattern position
|
/// Allow anonymous constants from an inline `const` block in pattern position
|
||||||
(removed, inline_const_pat, "CURRENT_RUSTC_VERSION", Some(76001),
|
(removed, inline_const_pat, "1.88.0", Some(76001),
|
||||||
Some("removed due to implementation concerns as it requires significant refactorings")),
|
Some("removed due to implementation concerns as it requires significant refactorings")),
|
||||||
/// Lazily evaluate constants. This allows constants to depend on type parameters.
|
/// Lazily evaluate constants. This allows constants to depend on type parameters.
|
||||||
(removed, lazy_normalization_consts, "1.46.0", Some(72219), Some("superseded by `generic_const_exprs`")),
|
(removed, lazy_normalization_consts, "1.46.0", Some(72219), Some("superseded by `generic_const_exprs`")),
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ declare_features! (
|
|||||||
/// Allows access to the emscripten_wasm_eh config, used by panic_unwind and unwind
|
/// Allows access to the emscripten_wasm_eh config, used by panic_unwind and unwind
|
||||||
(internal, cfg_emscripten_wasm_eh, "1.86.0", None),
|
(internal, cfg_emscripten_wasm_eh, "1.86.0", None),
|
||||||
/// Allows checking whether or not the backend correctly supports unstable float types.
|
/// Allows checking whether or not the backend correctly supports unstable float types.
|
||||||
(internal, cfg_target_has_reliable_f16_f128, "CURRENT_RUSTC_VERSION", None),
|
(internal, cfg_target_has_reliable_f16_f128, "1.88.0", None),
|
||||||
/// Allows identifying the `compiler_builtins` crate.
|
/// Allows identifying the `compiler_builtins` crate.
|
||||||
(internal, compiler_builtins, "1.13.0", None),
|
(internal, compiler_builtins, "1.13.0", None),
|
||||||
/// Allows writing custom MIR
|
/// Allows writing custom MIR
|
||||||
@@ -316,7 +316,7 @@ declare_features! (
|
|||||||
// Unstable `#[target_feature]` directives.
|
// Unstable `#[target_feature]` directives.
|
||||||
(unstable, aarch64_unstable_target_feature, "1.82.0", Some(44839)),
|
(unstable, aarch64_unstable_target_feature, "1.82.0", Some(44839)),
|
||||||
(unstable, aarch64_ver_target_feature, "1.27.0", Some(44839)),
|
(unstable, aarch64_ver_target_feature, "1.27.0", Some(44839)),
|
||||||
(unstable, apx_target_feature, "CURRENT_RUSTC_VERSION", Some(139284)),
|
(unstable, apx_target_feature, "1.88.0", Some(139284)),
|
||||||
(unstable, arm_target_feature, "1.27.0", Some(44839)),
|
(unstable, arm_target_feature, "1.27.0", Some(44839)),
|
||||||
(unstable, avx512_target_feature, "1.27.0", Some(44839)),
|
(unstable, avx512_target_feature, "1.27.0", Some(44839)),
|
||||||
(unstable, bpf_target_feature, "1.54.0", Some(44839)),
|
(unstable, bpf_target_feature, "1.54.0", Some(44839)),
|
||||||
@@ -327,7 +327,7 @@ declare_features! (
|
|||||||
(unstable, loongarch_target_feature, "1.73.0", Some(44839)),
|
(unstable, loongarch_target_feature, "1.73.0", Some(44839)),
|
||||||
(unstable, m68k_target_feature, "1.85.0", Some(134328)),
|
(unstable, m68k_target_feature, "1.85.0", Some(134328)),
|
||||||
(unstable, mips_target_feature, "1.27.0", Some(44839)),
|
(unstable, mips_target_feature, "1.27.0", Some(44839)),
|
||||||
(unstable, movrs_target_feature, "CURRENT_RUSTC_VERSION", Some(137976)),
|
(unstable, movrs_target_feature, "1.88.0", Some(137976)),
|
||||||
(unstable, powerpc_target_feature, "1.27.0", Some(44839)),
|
(unstable, powerpc_target_feature, "1.27.0", Some(44839)),
|
||||||
(unstable, prfchw_target_feature, "1.78.0", Some(44839)),
|
(unstable, prfchw_target_feature, "1.78.0", Some(44839)),
|
||||||
(unstable, riscv_target_feature, "1.45.0", Some(44839)),
|
(unstable, riscv_target_feature, "1.45.0", Some(44839)),
|
||||||
@@ -385,7 +385,7 @@ declare_features! (
|
|||||||
/// Allows associated type defaults.
|
/// Allows associated type defaults.
|
||||||
(unstable, associated_type_defaults, "1.2.0", Some(29661)),
|
(unstable, associated_type_defaults, "1.2.0", Some(29661)),
|
||||||
/// Allows implementing `AsyncDrop`.
|
/// Allows implementing `AsyncDrop`.
|
||||||
(incomplete, async_drop, "CURRENT_RUSTC_VERSION", Some(126482)),
|
(incomplete, async_drop, "1.88.0", Some(126482)),
|
||||||
/// Allows async functions to be called from `dyn Trait`.
|
/// Allows async functions to be called from `dyn Trait`.
|
||||||
(incomplete, async_fn_in_dyn_trait, "1.85.0", Some(133119)),
|
(incomplete, async_fn_in_dyn_trait, "1.85.0", Some(133119)),
|
||||||
/// Allows `#[track_caller]` on async functions.
|
/// Allows `#[track_caller]` on async functions.
|
||||||
@@ -395,7 +395,7 @@ declare_features! (
|
|||||||
/// Allows `async` trait bound modifier.
|
/// Allows `async` trait bound modifier.
|
||||||
(unstable, async_trait_bounds, "1.85.0", Some(62290)),
|
(unstable, async_trait_bounds, "1.85.0", Some(62290)),
|
||||||
/// Allows using Intel AVX10 target features and intrinsics
|
/// Allows using Intel AVX10 target features and intrinsics
|
||||||
(unstable, avx10_target_feature, "CURRENT_RUSTC_VERSION", Some(138843)),
|
(unstable, avx10_target_feature, "1.88.0", Some(138843)),
|
||||||
/// Allows using C-variadics.
|
/// Allows using C-variadics.
|
||||||
(unstable, c_variadic, "1.34.0", Some(44930)),
|
(unstable, c_variadic, "1.34.0", Some(44930)),
|
||||||
/// Allows the use of `#[cfg(contract_checks)` to check if contract checks are enabled.
|
/// Allows the use of `#[cfg(contract_checks)` to check if contract checks are enabled.
|
||||||
@@ -483,11 +483,11 @@ declare_features! (
|
|||||||
/// Allows exhaustive pattern matching on types that contain uninhabited types.
|
/// Allows exhaustive pattern matching on types that contain uninhabited types.
|
||||||
(unstable, exhaustive_patterns, "1.13.0", Some(51085)),
|
(unstable, exhaustive_patterns, "1.13.0", Some(51085)),
|
||||||
/// Disallows `extern` without an explicit ABI.
|
/// Disallows `extern` without an explicit ABI.
|
||||||
(unstable, explicit_extern_abis, "CURRENT_RUSTC_VERSION", Some(134986)),
|
(unstable, explicit_extern_abis, "1.88.0", Some(134986)),
|
||||||
/// Allows explicit tail calls via `become` expression.
|
/// Allows explicit tail calls via `become` expression.
|
||||||
(incomplete, explicit_tail_calls, "1.72.0", Some(112788)),
|
(incomplete, explicit_tail_calls, "1.72.0", Some(112788)),
|
||||||
/// Allows using `#[export_stable]` which indicates that an item is exportable.
|
/// Allows using `#[export_stable]` which indicates that an item is exportable.
|
||||||
(incomplete, export_stable, "CURRENT_RUSTC_VERSION", Some(139939)),
|
(incomplete, export_stable, "1.88.0", Some(139939)),
|
||||||
/// Allows using `aapcs`, `efiapi`, `sysv64` and `win64` as calling conventions
|
/// Allows using `aapcs`, `efiapi`, `sysv64` and `win64` as calling conventions
|
||||||
/// for functions with varargs.
|
/// for functions with varargs.
|
||||||
(unstable, extended_varargs_abi_support, "1.65.0", Some(100189)),
|
(unstable, extended_varargs_abi_support, "1.65.0", Some(100189)),
|
||||||
@@ -512,7 +512,7 @@ declare_features! (
|
|||||||
/// Allows impls for the Freeze trait.
|
/// Allows impls for the Freeze trait.
|
||||||
(internal, freeze_impls, "1.78.0", Some(121675)),
|
(internal, freeze_impls, "1.78.0", Some(121675)),
|
||||||
/// Frontmatter `---` blocks for use by external tools.
|
/// Frontmatter `---` blocks for use by external tools.
|
||||||
(unstable, frontmatter, "CURRENT_RUSTC_VERSION", Some(136889)),
|
(unstable, frontmatter, "1.88.0", Some(136889)),
|
||||||
/// Allows defining gen blocks and `gen fn`.
|
/// Allows defining gen blocks and `gen fn`.
|
||||||
(unstable, gen_blocks, "1.75.0", Some(117078)),
|
(unstable, gen_blocks, "1.75.0", Some(117078)),
|
||||||
/// Infer generic args for both consts and types.
|
/// Infer generic args for both consts and types.
|
||||||
@@ -575,7 +575,7 @@ declare_features! (
|
|||||||
/// Allows `mut ref` and `mut ref mut` identifier patterns.
|
/// Allows `mut ref` and `mut ref mut` identifier patterns.
|
||||||
(incomplete, mut_ref, "1.79.0", Some(123076)),
|
(incomplete, mut_ref, "1.79.0", Some(123076)),
|
||||||
/// Allows using `#[naked]` on `extern "Rust"` functions.
|
/// Allows using `#[naked]` on `extern "Rust"` functions.
|
||||||
(unstable, naked_functions_rustic_abi, "CURRENT_RUSTC_VERSION", Some(138997)),
|
(unstable, naked_functions_rustic_abi, "1.88.0", Some(138997)),
|
||||||
/// Allows using `#[target_feature(enable = "...")]` on `#[naked]` on functions.
|
/// Allows using `#[target_feature(enable = "...")]` on `#[naked]` on functions.
|
||||||
(unstable, naked_functions_target_feature, "1.86.0", Some(138568)),
|
(unstable, naked_functions_target_feature, "1.86.0", Some(138568)),
|
||||||
/// Allows specifying the as-needed link modifier
|
/// Allows specifying the as-needed link modifier
|
||||||
@@ -641,7 +641,7 @@ declare_features! (
|
|||||||
/// Allows string patterns to dereference values to match them.
|
/// Allows string patterns to dereference values to match them.
|
||||||
(unstable, string_deref_patterns, "1.67.0", Some(87121)),
|
(unstable, string_deref_patterns, "1.67.0", Some(87121)),
|
||||||
/// Allows `super let` statements.
|
/// Allows `super let` statements.
|
||||||
(unstable, super_let, "CURRENT_RUSTC_VERSION", Some(139076)),
|
(unstable, super_let, "1.88.0", Some(139076)),
|
||||||
/// Allows subtrait items to shadow supertrait items.
|
/// Allows subtrait items to shadow supertrait items.
|
||||||
(unstable, supertrait_item_shadowing, "1.86.0", Some(89151)),
|
(unstable, supertrait_item_shadowing, "1.86.0", Some(89151)),
|
||||||
/// Allows using `#[thread_local]` on `static` items.
|
/// Allows using `#[thread_local]` on `static` items.
|
||||||
|
|||||||
@@ -25,9 +25,6 @@ fn invocation_relative_path_to_absolute(span: Span, path: &str) -> PathBuf {
|
|||||||
path.to_path_buf()
|
path.to_path_buf()
|
||||||
} else {
|
} else {
|
||||||
// `/a/b/c/foo/bar.rs` contains the current macro invocation
|
// `/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();
|
let mut source_file_path = span.local_file().unwrap();
|
||||||
// `/a/b/c/foo/`
|
// `/a/b/c/foo/`
|
||||||
source_file_path.pop();
|
source_file_path.pop();
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(associated_type_defaults)]
|
#![feature(associated_type_defaults)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(closure_track_caller)]
|
#![feature(closure_track_caller)]
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ This API is completely unstable and subject to change.
|
|||||||
#![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(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
//! the definitions in this file have equivalents in `rustc_ast_pretty`.
|
//! the definitions in this file have equivalents in `rustc_ast_pretty`.
|
||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(rustc::diagnostic_outside_of_impl)]
|
#![allow(rustc::diagnostic_outside_of_impl)]
|
||||||
#![allow(rustc::untranslatable_diagnostic)]
|
#![allow(rustc::untranslatable_diagnostic)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(array_windows)]
|
#![feature(array_windows)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
|
|||||||
@@ -16,7 +16,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(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(decl_macro)]
|
#![feature(decl_macro)]
|
||||||
#![feature(file_buffered)]
|
#![feature(file_buffered)]
|
||||||
#![feature(iter_intersperse)]
|
#![feature(iter_intersperse)]
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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(array_windows)]
|
#![feature(array_windows)]
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(rustc::default_hash_types)]
|
#![allow(rustc::default_hash_types)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![feature(proc_macro_diagnostic)]
|
#![feature(proc_macro_diagnostic)]
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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(coroutines)]
|
#![feature(coroutines)]
|
||||||
|
|||||||
@@ -28,7 +28,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(let_chains))]
|
|
||||||
#![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(allocator_api)]
|
#![feature(allocator_api)]
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(rustc::diagnostic_outside_of_impl)]
|
#![allow(rustc::diagnostic_outside_of_impl)]
|
||||||
#![allow(rustc::untranslatable_diagnostic)]
|
#![allow(rustc::untranslatable_diagnostic)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(associated_type_defaults)]
|
#![feature(associated_type_defaults)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(array_windows)]
|
#![feature(array_windows)]
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(array_windows)]
|
#![feature(array_windows)]
|
||||||
#![feature(file_buffered)]
|
#![feature(file_buffered)]
|
||||||
#![feature(if_let_guard)]
|
#![feature(if_let_guard)]
|
||||||
|
|||||||
@@ -4,7 +4,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(let_chains))]
|
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(debug_closure_helpers)]
|
#![feature(debug_closure_helpers)]
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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(associated_type_defaults)]
|
#![feature(associated_type_defaults)]
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(rustc::potential_query_instability, internal_features)]
|
#![allow(rustc::potential_query_instability, internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
#![feature(dropck_eyepatch)]
|
#![feature(dropck_eyepatch)]
|
||||||
|
|||||||
@@ -10,7 +10,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(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
//! compiler.
|
//! compiler.
|
||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
|
|
||||||
pub mod cfi;
|
pub mod cfi;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![feature(default_field_values)]
|
#![feature(default_field_values)]
|
||||||
#![feature(iter_intersperse)]
|
#![feature(iter_intersperse)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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(array_windows)]
|
#![feature(array_windows)]
|
||||||
|
|||||||
@@ -89,7 +89,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -14,7 +14,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(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
// tidy-alphabetical-start
|
// tidy-alphabetical-start
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
#![cfg_attr(bootstrap, feature(let_chains))]
|
|
||||||
#![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)]
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "compiler_builtins"
|
name = "compiler_builtins"
|
||||||
version = "0.1.158"
|
version = "0.1.159"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "164cdc689e4c6d69417f77a5f48be240c291e84fbef0b1281755dc754b19c809"
|
checksum = "448068da8f2326b2a0472353cb401dd8795a89c007ef30fff90f50706e862e72"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"rustc-std-workspace-core",
|
"rustc-std-workspace-core",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ bench = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
core = { path = "../core", public = true }
|
core = { path = "../core", public = true }
|
||||||
compiler_builtins = { version = "=0.1.158", features = ['rustc-dep-of-std'] }
|
compiler_builtins = { version = "=0.1.159", features = ['rustc-dep-of-std'] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
compiler-builtins-mem = ['compiler_builtins/mem']
|
compiler-builtins-mem = ['compiler_builtins/mem']
|
||||||
|
|||||||
@@ -87,5 +87,5 @@ pub use self::c_str::CString;
|
|||||||
#[stable(feature = "alloc_c_string", since = "1.64.0")]
|
#[stable(feature = "alloc_c_string", since = "1.64.0")]
|
||||||
pub use self::c_str::{FromVecWithNulError, IntoStringError, NulError};
|
pub use self::c_str::{FromVecWithNulError, IntoStringError, NulError};
|
||||||
|
|
||||||
#[stable(feature = "c_str_module", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "c_str_module", since = "1.88.0")]
|
||||||
pub mod c_str;
|
pub mod c_str;
|
||||||
|
|||||||
@@ -1832,7 +1832,7 @@ impl String {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
|
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
|
||||||
#[rustc_confusables("length", "size")]
|
#[rustc_confusables("length", "size")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
|
#[rustc_no_implicit_autorefs]
|
||||||
pub const fn len(&self) -> usize {
|
pub const fn len(&self) -> usize {
|
||||||
self.vec.len()
|
self.vec.len()
|
||||||
}
|
}
|
||||||
@@ -1852,7 +1852,7 @@ impl String {
|
|||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.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 {
|
pub const fn is_empty(&self) -> bool {
|
||||||
self.len() == 0
|
self.len() == 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
|
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
|
||||||
#![allow(static_mut_refs)]
|
#![allow(static_mut_refs)]
|
||||||
#![cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#![allow(unnecessary_transmutes)]
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::fmt::{self, Write};
|
use std::fmt::{self, Write};
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
|
|||||||
///
|
///
|
||||||
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
|
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
|
||||||
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
|
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
|
||||||
#[stable(feature = "naked_functions", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "naked_functions", since = "1.88.0")]
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) {
|
pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) {
|
||||||
/* compiler built-in */
|
/* compiler built-in */
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ impl<T> Cell<T> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "move_cell", since = "1.17.0")]
|
#[stable(feature = "move_cell", since = "1.17.0")]
|
||||||
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_cell", since = "1.88.0")]
|
||||||
#[rustc_confusables("swap")]
|
#[rustc_confusables("swap")]
|
||||||
pub const fn replace(&self, val: T) -> T {
|
pub const fn replace(&self, val: T) -> T {
|
||||||
// SAFETY: This can cause data races if called from a separate thread,
|
// SAFETY: This can cause data races if called from a separate thread,
|
||||||
@@ -537,7 +537,7 @@ impl<T: Copy> Cell<T> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_cell", since = "1.88.0")]
|
||||||
pub const fn get(&self) -> T {
|
pub const fn get(&self) -> T {
|
||||||
// SAFETY: This can cause data races if called from a separate thread,
|
// SAFETY: This can cause data races if called from a separate thread,
|
||||||
// but `Cell` is `!Sync` so this won't happen.
|
// but `Cell` is `!Sync` so this won't happen.
|
||||||
@@ -556,7 +556,7 @@ impl<T: Copy> Cell<T> {
|
|||||||
/// assert_eq!(c.get(), 6);
|
/// assert_eq!(c.get(), 6);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "cell_update", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "cell_update", since = "1.88.0")]
|
||||||
pub fn update(&self, f: impl FnOnce(T) -> T) {
|
pub fn update(&self, f: impl FnOnce(T) -> T) {
|
||||||
let old = self.get();
|
let old = self.get();
|
||||||
self.set(f(old));
|
self.set(f(old));
|
||||||
@@ -608,7 +608,7 @@ impl<T: ?Sized> Cell<T> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "cell_get_mut", since = "1.11.0")]
|
#[stable(feature = "cell_get_mut", since = "1.11.0")]
|
||||||
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_cell", since = "1.88.0")]
|
||||||
pub const fn get_mut(&mut self) -> &mut T {
|
pub const fn get_mut(&mut self) -> &mut T {
|
||||||
self.value.get_mut()
|
self.value.get_mut()
|
||||||
}
|
}
|
||||||
@@ -628,7 +628,7 @@ impl<T: ?Sized> Cell<T> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "as_cell", since = "1.37.0")]
|
#[stable(feature = "as_cell", since = "1.37.0")]
|
||||||
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_cell", since = "1.88.0")]
|
||||||
pub const fn from_mut(t: &mut T) -> &Cell<T> {
|
pub const fn from_mut(t: &mut T) -> &Cell<T> {
|
||||||
// SAFETY: `&mut` ensures unique access.
|
// SAFETY: `&mut` ensures unique access.
|
||||||
unsafe { &*(t as *mut T as *const Cell<T>) }
|
unsafe { &*(t as *mut T as *const Cell<T>) }
|
||||||
@@ -686,7 +686,7 @@ impl<T> Cell<[T]> {
|
|||||||
/// assert_eq!(slice_cell.len(), 3);
|
/// assert_eq!(slice_cell.len(), 3);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "as_cell", since = "1.37.0")]
|
#[stable(feature = "as_cell", since = "1.37.0")]
|
||||||
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_cell", since = "1.88.0")]
|
||||||
pub const fn as_slice_of_cells(&self) -> &[Cell<T>] {
|
pub const fn as_slice_of_cells(&self) -> &[Cell<T>] {
|
||||||
// SAFETY: `Cell<T>` has the same memory layout as `T`.
|
// SAFETY: `Cell<T>` has the same memory layout as `T`.
|
||||||
unsafe { &*(self as *const Cell<[T]> as *const [Cell<T>]) }
|
unsafe { &*(self as *const Cell<[T]> as *const [Cell<T>]) }
|
||||||
|
|||||||
@@ -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`].
|
/// Converts a `u32` to a `char`, ignoring validity. See [`char::from_u32_unchecked`].
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
|
pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
|
||||||
// SAFETY: the caller must guarantee that `i` is a valid char value.
|
// SAFETY: the caller must guarantee that `i` is a valid char value.
|
||||||
unsafe {
|
unsafe {
|
||||||
@@ -222,7 +222,7 @@ impl FromStr for char {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
const fn char_try_from_u32(i: u32) -> Result<char, CharTryFromError> {
|
const fn char_try_from_u32(i: u32) -> Result<char, CharTryFromError> {
|
||||||
// This is an optimized version of the check
|
// This is an optimized version of the check
|
||||||
// (i > MAX as u32) || (i >= 0xD800 && i <= 0xDFFF),
|
// (i > MAX as u32) || (i >= 0xD800 && i <= 0xDFFF),
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ pub use self::c_str::FromBytesUntilNulError;
|
|||||||
pub use self::c_str::FromBytesWithNulError;
|
pub use self::c_str::FromBytesWithNulError;
|
||||||
use crate::fmt;
|
use crate::fmt;
|
||||||
|
|
||||||
#[stable(feature = "c_str_module", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "c_str_module", since = "1.88.0")]
|
||||||
pub mod c_str;
|
pub mod c_str;
|
||||||
|
|
||||||
#[unstable(
|
#[unstable(
|
||||||
|
|||||||
@@ -19,14 +19,6 @@ pub struct Placeholder {
|
|||||||
pub width: Count,
|
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)
|
/// Used by [width](https://doc.rust-lang.org/std/fmt/#width)
|
||||||
/// and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
|
/// and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
|
||||||
#[lang = "format_count"]
|
#[lang = "format_count"]
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ use crate::task::{Context, Poll};
|
|||||||
/// are `Copy` get implicitly duplicated by the compiler, making it very
|
/// are `Copy` get implicitly duplicated by the compiler, making it very
|
||||||
/// hard to predict when, and how often destructors will be executed. As such,
|
/// hard to predict when, and how often destructors will be executed. As such,
|
||||||
/// these types cannot have destructors.
|
/// these types cannot have destructors.
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "async_drop", issue = "126482")]
|
#[unstable(feature = "async_drop", issue = "126482")]
|
||||||
#[lang = "async_drop"]
|
#[lang = "async_drop"]
|
||||||
pub trait AsyncDrop {
|
pub trait AsyncDrop {
|
||||||
@@ -42,7 +41,6 @@ pub trait AsyncDrop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Async drop.
|
/// Async drop.
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "async_drop", issue = "126482")]
|
#[unstable(feature = "async_drop", issue = "126482")]
|
||||||
#[lang = "async_drop_in_place"]
|
#[lang = "async_drop_in_place"]
|
||||||
pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) {
|
pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) {
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ mod pending;
|
|||||||
mod poll_fn;
|
mod poll_fn;
|
||||||
mod ready;
|
mod ready;
|
||||||
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "async_drop", issue = "126482")]
|
#[unstable(feature = "async_drop", issue = "126482")]
|
||||||
pub use async_drop::{AsyncDrop, async_drop_in_place};
|
pub use async_drop::{AsyncDrop, async_drop_in_place};
|
||||||
#[stable(feature = "into_future", since = "1.64.0")]
|
#[stable(feature = "into_future", since = "1.64.0")]
|
||||||
|
|||||||
@@ -782,7 +782,7 @@ pub const fn cold_path() {
|
|||||||
/// # assert_eq!(bucket_one.len() + bucket_two.len(), 1);
|
/// # assert_eq!(bucket_one.len() + bucket_two.len(), 1);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "select_unpredictable", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "select_unpredictable", since = "1.88.0")]
|
||||||
pub fn select_unpredictable<T>(condition: bool, true_val: T, false_val: T) -> T {
|
pub fn select_unpredictable<T>(condition: bool, true_val: T, false_val: T) -> T {
|
||||||
// FIXME(https://github.com/rust-lang/unsafe-code-guidelines/issues/245):
|
// FIXME(https://github.com/rust-lang/unsafe-code-guidelines/issues/245):
|
||||||
// Change this to use ManuallyDrop instead.
|
// Change this to use ManuallyDrop instead.
|
||||||
|
|||||||
@@ -1476,7 +1476,7 @@ pub const fn forget<T: ?Sized>(_: T);
|
|||||||
/// Turning raw bytes (`[u8; SZ]`) into `u32`, `f64`, etc.:
|
/// 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 raw_bytes = [0x78, 0x56, 0x34, 0x12];
|
||||||
///
|
///
|
||||||
/// let num = unsafe {
|
/// let num = unsafe {
|
||||||
@@ -3413,7 +3413,6 @@ pub const fn contract_check_requires<C: Fn() -> bool + Copy>(cond: C) {
|
|||||||
/// returns false.
|
/// returns false.
|
||||||
///
|
///
|
||||||
/// Note that this function is a no-op during constant evaluation.
|
/// Note that this function is a no-op during constant evaluation.
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[unstable(feature = "contracts_internals", issue = "128044")]
|
#[unstable(feature = "contracts_internals", issue = "128044")]
|
||||||
// Similar to `contract_check_requires`, we need to use the user-facing
|
// Similar to `contract_check_requires`, we need to use the user-facing
|
||||||
// `contracts` feature rather than the perma-unstable `contracts_internals`.
|
// `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.
|
/// The intrinsic will return the size stored in that vtable.
|
||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
|
|||||||
@@ -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.
|
/// `idx` must be in-bounds of the vector.
|
||||||
#[rustc_nounwind]
|
#[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 {
|
pub unsafe fn simd_insert_dyn<T, U>(mut x: T, idx: u32, val: U) -> T {
|
||||||
// SAFETY: `idx` must be in-bounds
|
// SAFETY: `idx` must be in-bounds
|
||||||
unsafe { (&raw mut x).cast::<U>().add(idx as usize).write(val) }
|
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.
|
/// `idx` must be in-bounds of the vector.
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
#[cfg_attr(not(bootstrap), rustc_intrinsic)]
|
#[rustc_intrinsic]
|
||||||
pub unsafe fn simd_extract_dyn<T, U>(x: T, idx: u32) -> U {
|
pub unsafe fn simd_extract_dyn<T, U>(x: T, idx: u32) -> U {
|
||||||
// SAFETY: `idx` must be in-bounds
|
// SAFETY: `idx` must be in-bounds
|
||||||
unsafe { (&raw const x).cast::<U>().add(idx as usize).read() }
|
unsafe { (&raw const x).cast::<U>().add(idx as usize).read() }
|
||||||
|
|||||||
@@ -885,8 +885,7 @@ marker_impls! {
|
|||||||
///
|
///
|
||||||
/// This is part of [RFC 3467](https://rust-lang.github.io/rfcs/3467-unsafe-pinned.html), and is
|
/// 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).
|
/// tracked by [#125735](https://github.com/rust-lang/rust/issues/125735).
|
||||||
#[cfg_attr(not(bootstrap), lang = "unsafe_unpin")]
|
#[lang = "unsafe_unpin"]
|
||||||
#[cfg_attr(bootstrap, allow(dead_code))]
|
|
||||||
pub(crate) unsafe auto trait UnsafeUnpin {}
|
pub(crate) unsafe auto trait UnsafeUnpin {}
|
||||||
|
|
||||||
impl<T: ?Sized> !UnsafeUnpin for UnsafePinned<T> {}
|
impl<T: ?Sized> !UnsafeUnpin for UnsafePinned<T> {}
|
||||||
|
|||||||
@@ -893,7 +893,7 @@ impl f128 {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[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"]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
pub const fn to_bits(self) -> u128 {
|
pub const fn to_bits(self) -> u128 {
|
||||||
// SAFETY: `u128` is a plain old datatype so we can always transmute to it.
|
// SAFETY: `u128` is a plain old datatype so we can always transmute to it.
|
||||||
unsafe { mem::transmute(self) }
|
unsafe { mem::transmute(self) }
|
||||||
@@ -941,7 +941,7 @@ impl f128 {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[unstable(feature = "f128", issue = "116909")]
|
#[unstable(feature = "f128", issue = "116909")]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
pub const fn from_bits(v: u128) -> Self {
|
pub const fn from_bits(v: u128) -> Self {
|
||||||
// It turns out the safety issues with sNaN were overblown! Hooray!
|
// 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.
|
// SAFETY: `u128` is a plain old datatype so we can always transmute from it.
|
||||||
|
|||||||
@@ -881,7 +881,7 @@ impl f16 {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[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"]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
pub const fn to_bits(self) -> u16 {
|
pub const fn to_bits(self) -> u16 {
|
||||||
// SAFETY: `u16` is a plain old datatype so we can always transmute to it.
|
// SAFETY: `u16` is a plain old datatype so we can always transmute to it.
|
||||||
unsafe { mem::transmute(self) }
|
unsafe { mem::transmute(self) }
|
||||||
@@ -928,7 +928,7 @@ impl f16 {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[unstable(feature = "f16", issue = "116909")]
|
#[unstable(feature = "f16", issue = "116909")]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
pub const fn from_bits(v: u16) -> Self {
|
pub const fn from_bits(v: u16) -> Self {
|
||||||
// It turns out the safety issues with sNaN were overblown! Hooray!
|
// 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.
|
// SAFETY: `u16` is a plain old datatype so we can always transmute from it.
|
||||||
|
|||||||
@@ -1085,7 +1085,7 @@ impl f32 {
|
|||||||
#[stable(feature = "float_bits_conv", since = "1.20.0")]
|
#[stable(feature = "float_bits_conv", since = "1.20.0")]
|
||||||
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
|
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
pub const fn to_bits(self) -> u32 {
|
pub const fn to_bits(self) -> u32 {
|
||||||
// SAFETY: `u32` is a plain old datatype so we can always transmute to it.
|
// SAFETY: `u32` is a plain old datatype so we can always transmute to it.
|
||||||
unsafe { mem::transmute(self) }
|
unsafe { mem::transmute(self) }
|
||||||
@@ -1131,7 +1131,7 @@ impl f32 {
|
|||||||
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
|
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
pub const fn from_bits(v: u32) -> Self {
|
pub const fn from_bits(v: u32) -> Self {
|
||||||
// It turns out the safety issues with sNaN were overblown! Hooray!
|
// 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.
|
// SAFETY: `u32` is a plain old datatype so we can always transmute from it.
|
||||||
|
|||||||
@@ -1083,7 +1083,7 @@ impl f64 {
|
|||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[stable(feature = "float_bits_conv", since = "1.20.0")]
|
#[stable(feature = "float_bits_conv", since = "1.20.0")]
|
||||||
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
|
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn to_bits(self) -> u64 {
|
pub const fn to_bits(self) -> u64 {
|
||||||
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
|
// 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")]
|
#[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
pub const fn from_bits(v: u64) -> Self {
|
pub const fn from_bits(v: u64) -> Self {
|
||||||
// It turns out the safety issues with sNaN were overblown! Hooray!
|
// 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.
|
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
|
||||||
|
|||||||
@@ -3675,7 +3675,7 @@ macro_rules! int_impl {
|
|||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
|
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
|
||||||
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.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
|
// SAFETY: const sound because integers are plain old datatypes so we can always
|
||||||
// transmute them to arrays of bytes
|
// transmute them to arrays of bytes
|
||||||
#[must_use = "this returns the result of the operation, \
|
#[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")]
|
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
|
||||||
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
|
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
// SAFETY: const sound because integers are plain old datatypes so we can always
|
// SAFETY: const sound because integers are plain old datatypes so we can always
|
||||||
// transmute to them
|
// transmute to them
|
||||||
|
|||||||
@@ -3523,7 +3523,7 @@ macro_rules! uint_impl {
|
|||||||
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
|
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
|
||||||
#[must_use = "this returns the result of the operation, \
|
#[must_use = "this returns the result of the operation, \
|
||||||
without modifying the original"]
|
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
|
// SAFETY: const sound because integers are plain old datatypes so we can always
|
||||||
// transmute them to arrays of bytes
|
// transmute them to arrays of bytes
|
||||||
#[inline]
|
#[inline]
|
||||||
@@ -3625,7 +3625,7 @@ macro_rules! uint_impl {
|
|||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
|
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
|
||||||
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
|
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
|
||||||
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
|
#[allow(unnecessary_transmutes)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
// SAFETY: const sound because integers are plain old datatypes so we can always
|
// SAFETY: const sound because integers are plain old datatypes so we can always
|
||||||
// transmute to them
|
// transmute to them
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ pub trait Index<Idx: ?Sized> {
|
|||||||
///
|
///
|
||||||
/// May panic if the index is out of bounds.
|
/// May panic if the index is out of bounds.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
|
#[rustc_no_implicit_autorefs]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
fn index(&self, index: Idx) -> &Self::Output;
|
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.
|
/// May panic if the index is out of bounds.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
|
#[rustc_no_implicit_autorefs]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
|
fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,7 +206,6 @@ pub mod panic_const {
|
|||||||
}
|
}
|
||||||
// Separated panic constants list for async drop feature
|
// Separated panic constants list for async drop feature
|
||||||
// (May be joined when the corresponding lang items will be in the bootstrap)
|
// (May be joined when the corresponding lang items will be in the bootstrap)
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
panic_const! {
|
panic_const! {
|
||||||
panic_const_coroutine_resumed_drop = "coroutine resumed after async drop",
|
panic_const_coroutine_resumed_drop = "coroutine resumed after async drop",
|
||||||
panic_const_async_fn_resumed_drop = "`async fn` resumed after async drop",
|
panic_const_async_fn_resumed_drop = "`async fn` resumed after async drop",
|
||||||
|
|||||||
@@ -1093,9 +1093,6 @@ pub use self::unsafe_pinned::UnsafePinned;
|
|||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct Pin<Ptr> {
|
pub struct Pin<Ptr> {
|
||||||
/// Only public for bootstrap.
|
/// Only public for bootstrap.
|
||||||
#[cfg(bootstrap)]
|
|
||||||
pub pointer: Ptr,
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pointer: Ptr,
|
pointer: Ptr,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1936,10 +1933,11 @@ unsafe impl<T: ?Sized> PinCoerceUnsized for *mut T {}
|
|||||||
/// constructor.
|
/// constructor.
|
||||||
///
|
///
|
||||||
/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
|
/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[stable(feature = "pin_macro", since = "1.68.0")]
|
#[stable(feature = "pin_macro", since = "1.68.0")]
|
||||||
#[rustc_macro_transparency = "semitransparent"]
|
#[rustc_macro_transparency = "semitransparent"]
|
||||||
#[allow_internal_unstable(super_let)]
|
#[allow_internal_unstable(super_let)]
|
||||||
|
// `super` gets removed by rustfmt
|
||||||
|
#[rustfmt::skip]
|
||||||
pub macro pin($value:expr $(,)?) {
|
pub macro pin($value:expr $(,)?) {
|
||||||
{
|
{
|
||||||
super let mut pinned = $value;
|
super let mut pinned = $value;
|
||||||
@@ -1947,11 +1945,3 @@ pub macro pin($value:expr $(,)?) {
|
|||||||
unsafe { $crate::pin::Pin::new_unchecked(&mut pinned) }
|
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 } }
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ use crate::{fmt, ptr};
|
|||||||
/// Use `UnsafeCell` for that.
|
/// Use `UnsafeCell` for that.
|
||||||
///
|
///
|
||||||
/// This type blocks niches the same way `UnsafeCell` does.
|
/// This type blocks niches the same way `UnsafeCell` does.
|
||||||
#[cfg_attr(not(bootstrap), lang = "unsafe_pinned")]
|
#[lang = "unsafe_pinned"]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[unstable(feature = "unsafe_pinned", issue = "125735")]
|
#[unstable(feature = "unsafe_pinned", issue = "125735")]
|
||||||
pub struct UnsafePinned<T: ?Sized> {
|
pub struct UnsafePinned<T: ?Sized> {
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ pub use crate::hash::macros::Hash;
|
|||||||
|
|
||||||
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
|
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
pub use crate::{
|
pub use crate::{
|
||||||
assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
|
assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
|
||||||
|
|||||||
@@ -1741,7 +1741,7 @@ impl<T: ?Sized> PartialOrd for *const T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "raw_ptr_default", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "raw_ptr_default", since = "1.88.0")]
|
||||||
impl<T: ?Sized + Thin> Default for *const T {
|
impl<T: ?Sized + Thin> Default for *const T {
|
||||||
/// Returns the default value of [`null()`][crate::ptr::null].
|
/// Returns the default value of [`null()`][crate::ptr::null].
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
|
|||||||
@@ -1101,7 +1101,7 @@ pub const unsafe fn swap<T>(x: *mut T, y: *mut T) {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "swap_nonoverlapping", since = "1.27.0")]
|
#[stable(feature = "swap_nonoverlapping", since = "1.27.0")]
|
||||||
#[rustc_const_stable(feature = "const_swap_nonoverlapping", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_swap_nonoverlapping", since = "1.88.0")]
|
||||||
#[rustc_diagnostic_item = "ptr_swap_nonoverlapping"]
|
#[rustc_diagnostic_item = "ptr_swap_nonoverlapping"]
|
||||||
#[rustc_allow_const_fn_unstable(const_eval_select)] // both implementations behave the same
|
#[rustc_allow_const_fn_unstable(const_eval_select)] // both implementations behave the same
|
||||||
pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
|
pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
|
||||||
|
|||||||
@@ -1576,7 +1576,7 @@ impl<T: ?Sized> *mut T {
|
|||||||
///
|
///
|
||||||
/// [`ptr::replace`]: crate::ptr::replace()
|
/// [`ptr::replace`]: crate::ptr::replace()
|
||||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||||
#[rustc_const_stable(feature = "const_inherent_ptr_replace", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_inherent_ptr_replace", since = "1.88.0")]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub const unsafe fn replace(self, src: T) -> T
|
pub const unsafe fn replace(self, src: T) -> T
|
||||||
where
|
where
|
||||||
@@ -2159,7 +2159,7 @@ impl<T: ?Sized> PartialOrd for *mut T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "raw_ptr_default", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "raw_ptr_default", since = "1.88.0")]
|
||||||
impl<T: ?Sized + Thin> Default for *mut T {
|
impl<T: ?Sized + Thin> Default for *mut T {
|
||||||
/// Returns the default value of [`null_mut()`][crate::ptr::null_mut].
|
/// Returns the default value of [`null_mut()`][crate::ptr::null_mut].
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
|
|||||||
@@ -1166,7 +1166,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::replace`]: crate::ptr::replace()
|
/// [`ptr::replace`]: crate::ptr::replace()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "const_inherent_ptr_replace", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "const_inherent_ptr_replace", since = "1.88.0")]
|
||||||
pub const unsafe fn replace(self, src: T) -> T
|
pub const unsafe fn replace(self, src: T) -> T
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ impl<T> [T] {
|
|||||||
#[lang = "slice_len_fn"]
|
#[lang = "slice_len_fn"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_slice_len", since = "1.39.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]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn len(&self) -> usize {
|
pub const fn len(&self) -> usize {
|
||||||
@@ -129,7 +129,7 @@ impl<T> [T] {
|
|||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_slice_is_empty", since = "1.39.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]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn is_empty(&self) -> bool {
|
pub const fn is_empty(&self) -> bool {
|
||||||
@@ -564,7 +564,7 @@ impl<T> [T] {
|
|||||||
/// assert_eq!(None, v.get(0..4));
|
/// assert_eq!(None, v.get(0..4));
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
|
#[rustc_no_implicit_autorefs]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn get<I>(&self, index: I) -> Option<&I::Output>
|
pub fn get<I>(&self, index: I) -> Option<&I::Output>
|
||||||
@@ -590,7 +590,7 @@ impl<T> [T] {
|
|||||||
/// assert_eq!(x, &[0, 42, 2]);
|
/// assert_eq!(x, &[0, 42, 2]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
|
#[rustc_no_implicit_autorefs]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn get_mut<I>(&mut self, index: I) -> Option<&mut I::Output>
|
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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
|
#[rustc_no_implicit_autorefs]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub unsafe fn get_unchecked<I>(&self, index: I) -> &I::Output
|
pub unsafe fn get_unchecked<I>(&self, index: I) -> &I::Output
|
||||||
@@ -671,7 +671,7 @@ impl<T> [T] {
|
|||||||
/// assert_eq!(x, &[1, 13, 4]);
|
/// assert_eq!(x, &[1, 13, 4]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
|
#[rustc_no_implicit_autorefs]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub unsafe fn get_unchecked_mut<I>(&mut self, index: I) -> &mut I::Output
|
pub unsafe fn get_unchecked_mut<I>(&mut self, index: I) -> &mut I::Output
|
||||||
@@ -1303,8 +1303,8 @@ impl<T> [T] {
|
|||||||
/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
|
/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
|
||||||
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
|
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[rustc_const_stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]] {
|
pub const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]] {
|
||||||
@@ -1360,8 +1360,8 @@ impl<T> [T] {
|
|||||||
/// };
|
/// };
|
||||||
/// assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
|
/// assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[rustc_const_stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
@@ -1407,8 +1407,8 @@ impl<T> [T] {
|
|||||||
/// assert_eq!(remainder, &['l']);
|
/// assert_eq!(remainder, &['l']);
|
||||||
/// assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
|
/// assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[rustc_const_stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
@@ -1498,8 +1498,8 @@ impl<T> [T] {
|
|||||||
/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
|
/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
|
||||||
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
|
/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[rustc_const_stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]] {
|
pub const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]] {
|
||||||
@@ -1551,8 +1551,8 @@ impl<T> [T] {
|
|||||||
/// }
|
/// }
|
||||||
/// assert_eq!(v, &[1, 1, 2, 2, 9]);
|
/// assert_eq!(v, &[1, 1, 2, 2, 9]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[rustc_const_stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
@@ -1604,8 +1604,8 @@ impl<T> [T] {
|
|||||||
/// }
|
/// }
|
||||||
/// assert_eq!(v, &[9, 1, 1, 2, 2]);
|
/// assert_eq!(v, &[9, 1, 1, 2, 2]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[rustc_const_stable(feature = "slice_as_chunks", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "slice_as_chunks", since = "1.88.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ impl str {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_str_len", since = "1.39.0")]
|
#[rustc_const_stable(feature = "const_str_len", since = "1.39.0")]
|
||||||
#[rustc_diagnostic_item = "str_len"]
|
#[rustc_diagnostic_item = "str_len"]
|
||||||
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
|
#[rustc_no_implicit_autorefs]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn len(&self) -> usize {
|
pub const fn len(&self) -> usize {
|
||||||
@@ -154,7 +154,7 @@ impl str {
|
|||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_str_is_empty", since = "1.39.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]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn is_empty(&self) -> bool {
|
pub const fn is_empty(&self) -> bool {
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ fn rust_2024_expr() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
fn temp_lifetime() {
|
fn temp_lifetime() {
|
||||||
// Check that temporary lifetimes work as in Rust 2021.
|
// Check that temporary lifetimes work as in Rust 2021.
|
||||||
// Regression test for https://github.com/rust-lang/rust/issues/138596
|
// Regression test for https://github.com/rust-lang/rust/issues/138596
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ impl Arena {
|
|||||||
/// Allocates a byte slice with specified size from the current memory
|
/// Allocates a byte slice with specified size from the current memory
|
||||||
/// chunk. Returns `None` if there is no free space left to satisfy the
|
/// chunk. Returns `None` if there is no free space left to satisfy the
|
||||||
/// request.
|
/// request.
|
||||||
|
#[allow(clippy::mut_from_ref)]
|
||||||
fn alloc_raw_without_grow(&self, bytes: usize) -> Option<&mut [MaybeUninit<u8>]> {
|
fn alloc_raw_without_grow(&self, bytes: usize) -> Option<&mut [MaybeUninit<u8>]> {
|
||||||
let start = self.start.get().addr();
|
let start = self.start.get().addr();
|
||||||
let old_end = self.end.get();
|
let old_end = self.end.get();
|
||||||
|
|||||||
@@ -513,13 +513,13 @@ impl Span {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Creates an empty span pointing to directly before this span.
|
/// Creates an empty span pointing to directly before this span.
|
||||||
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "proc_macro_span_location", since = "1.88.0")]
|
||||||
pub fn start(&self) -> Span {
|
pub fn start(&self) -> Span {
|
||||||
Span(self.0.start())
|
Span(self.0.start())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates an empty span pointing to directly after this span.
|
/// Creates an empty span pointing to directly after this span.
|
||||||
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "proc_macro_span_location", since = "1.88.0")]
|
||||||
pub fn end(&self) -> Span {
|
pub fn end(&self) -> Span {
|
||||||
Span(self.0.end())
|
Span(self.0.end())
|
||||||
}
|
}
|
||||||
@@ -527,7 +527,7 @@ impl Span {
|
|||||||
/// The one-indexed line of the source file where the span starts.
|
/// The one-indexed line of the source file where the span starts.
|
||||||
///
|
///
|
||||||
/// To obtain the line of the span's end, use `span.end().line()`.
|
/// To obtain the line of the span's end, use `span.end().line()`.
|
||||||
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "proc_macro_span_location", since = "1.88.0")]
|
||||||
pub fn line(&self) -> usize {
|
pub fn line(&self) -> usize {
|
||||||
self.0.line()
|
self.0.line()
|
||||||
}
|
}
|
||||||
@@ -535,7 +535,7 @@ impl Span {
|
|||||||
/// The one-indexed column of the source file where the span starts.
|
/// The one-indexed column of the source file where the span starts.
|
||||||
///
|
///
|
||||||
/// To obtain the column of the span's end, use `span.end().column()`.
|
/// To obtain the column of the span's end, use `span.end().column()`.
|
||||||
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "proc_macro_span_location", since = "1.88.0")]
|
||||||
pub fn column(&self) -> usize {
|
pub fn column(&self) -> usize {
|
||||||
self.0.column()
|
self.0.column()
|
||||||
}
|
}
|
||||||
@@ -544,7 +544,7 @@ impl Span {
|
|||||||
///
|
///
|
||||||
/// This might not correspond to a valid file system path.
|
/// This might not correspond to a valid file system path.
|
||||||
/// It might be remapped (e.g. `"/src/lib.rs"`) or an artificial path (e.g. `"<command line>"`).
|
/// It might be remapped (e.g. `"/src/lib.rs"`) or an artificial path (e.g. `"<command line>"`).
|
||||||
#[stable(feature = "proc_macro_span_file", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "proc_macro_span_file", since = "1.88.0")]
|
||||||
pub fn file(&self) -> String {
|
pub fn file(&self) -> String {
|
||||||
self.0.file()
|
self.0.file()
|
||||||
}
|
}
|
||||||
@@ -554,7 +554,7 @@ impl Span {
|
|||||||
/// This is the actual path on disk. It is unaffected by path remapping.
|
/// This is the actual path on disk. It is unaffected by path remapping.
|
||||||
///
|
///
|
||||||
/// This path should not be embedded in the output of the macro; prefer `file()` instead.
|
/// This path should not be embedded in the output of the macro; prefer `file()` instead.
|
||||||
#[stable(feature = "proc_macro_span_file", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "proc_macro_span_file", since = "1.88.0")]
|
||||||
pub fn local_file(&self) -> Option<PathBuf> {
|
pub fn local_file(&self) -> Option<PathBuf> {
|
||||||
self.0.local_file().map(|s| PathBuf::from(s))
|
self.0.local_file().map(|s| PathBuf::from(s))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
|
|||||||
panic_unwind = { path = "../panic_unwind", optional = true }
|
panic_unwind = { path = "../panic_unwind", optional = true }
|
||||||
panic_abort = { path = "../panic_abort" }
|
panic_abort = { path = "../panic_abort" }
|
||||||
core = { path = "../core", public = true }
|
core = { path = "../core", public = true }
|
||||||
compiler_builtins = { version = "=0.1.158" }
|
compiler_builtins = { version = "=0.1.159" }
|
||||||
unwind = { path = "../unwind" }
|
unwind = { path = "../unwind" }
|
||||||
hashbrown = { version = "0.15", default-features = false, features = [
|
hashbrown = { version = "0.15", default-features = false, features = [
|
||||||
'rustc-dep-of-std',
|
'rustc-dep-of-std',
|
||||||
|
|||||||
@@ -683,7 +683,7 @@ impl<K, V, S> HashMap<K, V, S> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_lint_query_instability]
|
#[rustc_lint_query_instability]
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F>
|
pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F>
|
||||||
where
|
where
|
||||||
F: FnMut(&K, &mut V) -> bool,
|
F: FnMut(&K, &mut V) -> bool,
|
||||||
@@ -1680,7 +1680,7 @@ impl<'a, K, V> Drain<'a, K, V> {
|
|||||||
/// ]);
|
/// ]);
|
||||||
/// let iter = map.extract_if(|_k, v| *v % 2 == 0);
|
/// let iter = map.extract_if(|_k, v| *v % 2 == 0);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||||
pub struct ExtractIf<'a, K, V, F> {
|
pub struct ExtractIf<'a, K, V, F> {
|
||||||
base: base::ExtractIf<'a, K, V, F>,
|
base: base::ExtractIf<'a, K, V, F>,
|
||||||
@@ -2294,7 +2294,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
impl<K, V, F> Iterator for ExtractIf<'_, K, V, F>
|
impl<K, V, F> Iterator for ExtractIf<'_, K, V, F>
|
||||||
where
|
where
|
||||||
F: FnMut(&K, &mut V) -> bool,
|
F: FnMut(&K, &mut V) -> bool,
|
||||||
@@ -2311,10 +2311,10 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
impl<K, V, F> FusedIterator for ExtractIf<'_, K, V, F> where F: FnMut(&K, &mut V) -> bool {}
|
impl<K, V, F> FusedIterator for ExtractIf<'_, K, V, F> where F: FnMut(&K, &mut V) -> bool {}
|
||||||
|
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
impl<K, V, F> fmt::Debug for ExtractIf<'_, K, V, F>
|
impl<K, V, F> fmt::Debug for ExtractIf<'_, K, V, F>
|
||||||
where
|
where
|
||||||
K: fmt::Debug,
|
K: fmt::Debug,
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ impl<T, S> HashSet<T, S> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_lint_query_instability]
|
#[rustc_lint_query_instability]
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, T, F>
|
pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, T, F>
|
||||||
where
|
where
|
||||||
F: FnMut(&T) -> bool,
|
F: FnMut(&T) -> bool,
|
||||||
@@ -1390,7 +1390,7 @@ pub struct Drain<'a, K: 'a> {
|
|||||||
///
|
///
|
||||||
/// let mut extract_ifed = a.extract_if(|v| v % 2 == 0);
|
/// let mut extract_ifed = a.extract_if(|v| v % 2 == 0);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
pub struct ExtractIf<'a, K, F> {
|
pub struct ExtractIf<'a, K, F> {
|
||||||
base: base::ExtractIf<'a, K, F>,
|
base: base::ExtractIf<'a, K, F>,
|
||||||
}
|
}
|
||||||
@@ -1670,7 +1670,7 @@ impl<K: fmt::Debug> fmt::Debug for Drain<'_, K> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
impl<K, F> Iterator for ExtractIf<'_, K, F>
|
impl<K, F> Iterator for ExtractIf<'_, K, F>
|
||||||
where
|
where
|
||||||
F: FnMut(&K) -> bool,
|
F: FnMut(&K) -> bool,
|
||||||
@@ -1687,10 +1687,10 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
impl<K, F> FusedIterator for ExtractIf<'_, K, F> where F: FnMut(&K) -> bool {}
|
impl<K, F> FusedIterator for ExtractIf<'_, K, F> where F: FnMut(&K) -> bool {}
|
||||||
|
|
||||||
#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "hash_extract_if", since = "1.88.0")]
|
||||||
impl<K, F> fmt::Debug for ExtractIf<'_, K, F>
|
impl<K, F> fmt::Debug for ExtractIf<'_, K, F>
|
||||||
where
|
where
|
||||||
K: fmt::Debug,
|
K: fmt::Debug,
|
||||||
|
|||||||
@@ -22,10 +22,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.7_f128;
|
/// let f = 3.7_f128;
|
||||||
@@ -53,10 +52,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.01_f128;
|
/// let f = 3.01_f128;
|
||||||
@@ -84,10 +82,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.3_f128;
|
/// let f = 3.3_f128;
|
||||||
@@ -120,10 +117,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.3_f128;
|
/// let f = 3.3_f128;
|
||||||
@@ -154,10 +150,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.7_f128;
|
/// let f = 3.7_f128;
|
||||||
@@ -186,10 +181,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 3.6_f128;
|
/// let x = 3.6_f128;
|
||||||
@@ -227,10 +221,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let m = 10.0_f128;
|
/// let m = 10.0_f128;
|
||||||
@@ -275,10 +268,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let a: f128 = 7.0;
|
/// let a: f128 = 7.0;
|
||||||
@@ -321,10 +313,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let a: f128 = 7.0;
|
/// let a: f128 = 7.0;
|
||||||
@@ -362,10 +353,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0_f128;
|
/// let x = 2.0_f128;
|
||||||
@@ -394,10 +384,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0_f128;
|
/// let x = 2.0_f128;
|
||||||
@@ -430,10 +419,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let positive = 4.0_f128;
|
/// let positive = 4.0_f128;
|
||||||
@@ -465,10 +453,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let one = 1.0f128;
|
/// let one = 1.0f128;
|
||||||
@@ -500,10 +487,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 2.0f128;
|
/// let f = 2.0f128;
|
||||||
@@ -535,10 +521,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let one = 1.0f128;
|
/// let one = 1.0f128;
|
||||||
@@ -555,10 +540,9 @@ impl f128 {
|
|||||||
/// Non-positive values:
|
/// Non-positive values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!(0_f128.ln(), f128::NEG_INFINITY);
|
/// assert_eq!(0_f128.ln(), f128::NEG_INFINITY);
|
||||||
@@ -590,10 +574,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let five = 5.0f128;
|
/// let five = 5.0f128;
|
||||||
@@ -608,10 +591,9 @@ impl f128 {
|
|||||||
/// Non-positive values:
|
/// Non-positive values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!(0_f128.log(10.0), f128::NEG_INFINITY);
|
/// assert_eq!(0_f128.log(10.0), f128::NEG_INFINITY);
|
||||||
@@ -639,10 +621,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let two = 2.0f128;
|
/// let two = 2.0f128;
|
||||||
@@ -657,10 +638,9 @@ impl f128 {
|
|||||||
/// Non-positive values:
|
/// Non-positive values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!(0_f128.log2(), f128::NEG_INFINITY);
|
/// assert_eq!(0_f128.log2(), f128::NEG_INFINITY);
|
||||||
@@ -688,10 +668,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let ten = 10.0f128;
|
/// let ten = 10.0f128;
|
||||||
@@ -706,10 +685,9 @@ impl f128 {
|
|||||||
/// Non-positive values:
|
/// Non-positive values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!(0_f128.log10(), f128::NEG_INFINITY);
|
/// assert_eq!(0_f128.log10(), f128::NEG_INFINITY);
|
||||||
@@ -739,10 +717,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 8.0f128;
|
/// let x = 8.0f128;
|
||||||
@@ -779,10 +756,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0f128;
|
/// let x = 2.0f128;
|
||||||
@@ -813,10 +789,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = std::f128::consts::FRAC_PI_2;
|
/// let x = std::f128::consts::FRAC_PI_2;
|
||||||
@@ -845,10 +820,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0 * std::f128::consts::PI;
|
/// let x = 2.0 * std::f128::consts::PI;
|
||||||
@@ -880,10 +854,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = std::f128::consts::FRAC_PI_4;
|
/// let x = std::f128::consts::FRAC_PI_4;
|
||||||
@@ -916,10 +889,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = std::f128::consts::FRAC_PI_2;
|
/// let f = std::f128::consts::FRAC_PI_2;
|
||||||
@@ -955,10 +927,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = std::f128::consts::FRAC_PI_4;
|
/// let f = std::f128::consts::FRAC_PI_4;
|
||||||
@@ -993,10 +964,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 1.0f128;
|
/// let f = 1.0f128;
|
||||||
@@ -1035,10 +1005,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// // Positive angles measured counter-clockwise
|
/// // Positive angles measured counter-clockwise
|
||||||
@@ -1081,10 +1050,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = std::f128::consts::FRAC_PI_4;
|
/// let x = std::f128::consts::FRAC_PI_4;
|
||||||
@@ -1120,10 +1088,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 1e-8_f128;
|
/// let x = 1e-8_f128;
|
||||||
@@ -1160,10 +1127,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 1e-8_f128;
|
/// let x = 1e-8_f128;
|
||||||
@@ -1179,10 +1145,9 @@ impl f128 {
|
|||||||
/// Out-of-range values:
|
/// Out-of-range values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!((-1.0_f128).ln_1p(), f128::NEG_INFINITY);
|
/// assert_eq!((-1.0_f128).ln_1p(), f128::NEG_INFINITY);
|
||||||
@@ -1212,10 +1177,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let e = std::f128::consts::E;
|
/// let e = std::f128::consts::E;
|
||||||
@@ -1251,10 +1215,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let e = std::f128::consts::E;
|
/// let e = std::f128::consts::E;
|
||||||
@@ -1290,10 +1253,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let e = std::f128::consts::E;
|
/// let e = std::f128::consts::E;
|
||||||
@@ -1326,10 +1288,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 1.0f128;
|
/// let x = 1.0f128;
|
||||||
@@ -1362,10 +1323,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 1.0f128;
|
/// let x = 1.0f128;
|
||||||
@@ -1400,10 +1360,9 @@ impl f128 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let e = std::f128::consts::E;
|
/// let e = std::f128::consts::E;
|
||||||
@@ -1438,10 +1397,9 @@ impl f128 {
|
|||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// #![feature(float_gamma)]
|
/// #![feature(float_gamma)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 5.0f128;
|
/// let x = 5.0f128;
|
||||||
@@ -1477,10 +1435,9 @@ impl f128 {
|
|||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// #![feature(float_gamma)]
|
/// #![feature(float_gamma)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0f128;
|
/// let x = 2.0f128;
|
||||||
@@ -1516,10 +1473,9 @@ impl f128 {
|
|||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// #![feature(float_erf)]
|
/// #![feature(float_erf)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
/// /// The error function relates what percent of a normal distribution lies
|
/// /// The error function relates what percent of a normal distribution lies
|
||||||
/// /// within `x` standard deviations (scaled by `1/sqrt(2)`).
|
/// /// within `x` standard deviations (scaled by `1/sqrt(2)`).
|
||||||
@@ -1559,10 +1515,9 @@ impl f128 {
|
|||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f128)]
|
/// #![feature(f128)]
|
||||||
/// #![feature(float_erf)]
|
/// #![feature(float_erf)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f128_math)] {
|
/// # #[cfg(target_has_reliable_f128_math)] {
|
||||||
/// let x: f128 = 0.123;
|
/// let x: f128 = 0.123;
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -22,10 +22,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.7_f16;
|
/// let f = 3.7_f16;
|
||||||
@@ -53,10 +52,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.01_f16;
|
/// let f = 3.01_f16;
|
||||||
@@ -84,10 +82,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.3_f16;
|
/// let f = 3.3_f16;
|
||||||
@@ -120,10 +117,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.3_f16;
|
/// let f = 3.3_f16;
|
||||||
@@ -154,10 +150,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 3.7_f16;
|
/// let f = 3.7_f16;
|
||||||
@@ -186,10 +181,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 3.6_f16;
|
/// let x = 3.6_f16;
|
||||||
@@ -227,10 +221,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let m = 10.0_f16;
|
/// let m = 10.0_f16;
|
||||||
@@ -275,10 +268,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let a: f16 = 7.0;
|
/// let a: f16 = 7.0;
|
||||||
@@ -321,10 +313,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let a: f16 = 7.0;
|
/// let a: f16 = 7.0;
|
||||||
@@ -362,10 +353,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0_f16;
|
/// let x = 2.0_f16;
|
||||||
@@ -394,10 +384,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0_f16;
|
/// let x = 2.0_f16;
|
||||||
@@ -430,10 +419,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let positive = 4.0_f16;
|
/// let positive = 4.0_f16;
|
||||||
@@ -465,10 +453,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let one = 1.0f16;
|
/// let one = 1.0f16;
|
||||||
@@ -500,10 +487,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 2.0f16;
|
/// let f = 2.0f16;
|
||||||
@@ -535,10 +521,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let one = 1.0f16;
|
/// let one = 1.0f16;
|
||||||
@@ -555,10 +540,9 @@ impl f16 {
|
|||||||
/// Non-positive values:
|
/// Non-positive values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!(0_f16.ln(), f16::NEG_INFINITY);
|
/// assert_eq!(0_f16.ln(), f16::NEG_INFINITY);
|
||||||
@@ -590,10 +574,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let five = 5.0f16;
|
/// let five = 5.0f16;
|
||||||
@@ -608,10 +591,9 @@ impl f16 {
|
|||||||
/// Non-positive values:
|
/// Non-positive values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!(0_f16.log(10.0), f16::NEG_INFINITY);
|
/// assert_eq!(0_f16.log(10.0), f16::NEG_INFINITY);
|
||||||
@@ -639,10 +621,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let two = 2.0f16;
|
/// let two = 2.0f16;
|
||||||
@@ -657,10 +638,9 @@ impl f16 {
|
|||||||
/// Non-positive values:
|
/// Non-positive values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!(0_f16.log2(), f16::NEG_INFINITY);
|
/// assert_eq!(0_f16.log2(), f16::NEG_INFINITY);
|
||||||
@@ -688,10 +668,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let ten = 10.0f16;
|
/// let ten = 10.0f16;
|
||||||
@@ -706,10 +685,9 @@ impl f16 {
|
|||||||
/// Non-positive values:
|
/// Non-positive values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!(0_f16.log10(), f16::NEG_INFINITY);
|
/// assert_eq!(0_f16.log10(), f16::NEG_INFINITY);
|
||||||
@@ -738,10 +716,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 8.0f16;
|
/// let x = 8.0f16;
|
||||||
@@ -777,10 +754,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0f16;
|
/// let x = 2.0f16;
|
||||||
@@ -811,10 +787,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = std::f16::consts::FRAC_PI_2;
|
/// let x = std::f16::consts::FRAC_PI_2;
|
||||||
@@ -843,10 +818,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0 * std::f16::consts::PI;
|
/// let x = 2.0 * std::f16::consts::PI;
|
||||||
@@ -878,10 +852,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = std::f16::consts::FRAC_PI_4;
|
/// let x = std::f16::consts::FRAC_PI_4;
|
||||||
@@ -914,10 +887,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = std::f16::consts::FRAC_PI_2;
|
/// let f = std::f16::consts::FRAC_PI_2;
|
||||||
@@ -953,10 +925,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = std::f16::consts::FRAC_PI_4;
|
/// let f = std::f16::consts::FRAC_PI_4;
|
||||||
@@ -991,10 +962,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let f = 1.0f16;
|
/// let f = 1.0f16;
|
||||||
@@ -1033,10 +1003,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// // Positive angles measured counter-clockwise
|
/// // Positive angles measured counter-clockwise
|
||||||
@@ -1079,10 +1048,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = std::f16::consts::FRAC_PI_4;
|
/// let x = std::f16::consts::FRAC_PI_4;
|
||||||
@@ -1118,10 +1086,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 1e-4_f16;
|
/// let x = 1e-4_f16;
|
||||||
@@ -1158,10 +1125,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 1e-4_f16;
|
/// let x = 1e-4_f16;
|
||||||
@@ -1177,10 +1143,9 @@ impl f16 {
|
|||||||
/// Out-of-range values:
|
/// Out-of-range values:
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// assert_eq!((-1.0_f16).ln_1p(), f16::NEG_INFINITY);
|
/// assert_eq!((-1.0_f16).ln_1p(), f16::NEG_INFINITY);
|
||||||
@@ -1210,10 +1175,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let e = std::f16::consts::E;
|
/// let e = std::f16::consts::E;
|
||||||
@@ -1249,10 +1213,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let e = std::f16::consts::E;
|
/// let e = std::f16::consts::E;
|
||||||
@@ -1288,10 +1251,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let e = std::f16::consts::E;
|
/// let e = std::f16::consts::E;
|
||||||
@@ -1324,10 +1286,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 1.0f16;
|
/// let x = 1.0f16;
|
||||||
@@ -1360,10 +1321,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 1.0f16;
|
/// let x = 1.0f16;
|
||||||
@@ -1398,10 +1358,9 @@ impl f16 {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let e = std::f16::consts::E;
|
/// let e = std::f16::consts::E;
|
||||||
@@ -1436,10 +1395,9 @@ impl f16 {
|
|||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// #![feature(float_gamma)]
|
/// #![feature(float_gamma)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 5.0f16;
|
/// let x = 5.0f16;
|
||||||
@@ -1475,10 +1433,9 @@ impl f16 {
|
|||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// #![feature(float_gamma)]
|
/// #![feature(float_gamma)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
///
|
///
|
||||||
/// let x = 2.0f16;
|
/// let x = 2.0f16;
|
||||||
@@ -1514,10 +1471,9 @@ impl f16 {
|
|||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// #![feature(float_erf)]
|
/// #![feature(float_erf)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
/// /// The error function relates what percent of a normal distribution lies
|
/// /// The error function relates what percent of a normal distribution lies
|
||||||
/// /// within `x` standard deviations (scaled by `1/sqrt(2)`).
|
/// /// within `x` standard deviations (scaled by `1/sqrt(2)`).
|
||||||
@@ -1557,10 +1513,9 @@ impl f16 {
|
|||||||
/// ```
|
/// ```
|
||||||
/// #![feature(f16)]
|
/// #![feature(f16)]
|
||||||
/// #![feature(float_erf)]
|
/// #![feature(float_erf)]
|
||||||
/// # #![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
/// # #![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
/// # #![cfg_attr(not(bootstrap), expect(internal_features))]
|
/// # #![expect(internal_features)]
|
||||||
/// # #[cfg(not(miri))]
|
/// # #[cfg(not(miri))]
|
||||||
/// # #[cfg(not(bootstrap))]
|
|
||||||
/// # #[cfg(target_has_reliable_f16_math)] {
|
/// # #[cfg(target_has_reliable_f16_math)] {
|
||||||
/// let x: f16 = 0.123;
|
/// let x: f16 = 0.123;
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
||||||
#[stable(feature = "c_str_module", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "c_str_module", since = "1.88.0")]
|
||||||
pub mod c_str;
|
pub mod c_str;
|
||||||
|
|
||||||
#[stable(feature = "core_c_void", since = "1.30.0")]
|
#[stable(feature = "core_c_void", since = "1.30.0")]
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ use crate::{error, fmt, result, sys};
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[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>;
|
pub type Result<T> = result::Result<T, Error>;
|
||||||
|
|
||||||
/// The error type for I/O operations of the [`Read`], [`Write`], [`Seek`], and
|
/// The error type for I/O operations of the [`Read`], [`Write`], [`Seek`], and
|
||||||
|
|||||||
@@ -718,7 +718,6 @@ pub use core::todo;
|
|||||||
// Re-export built-in macros defined through core.
|
// Re-export built-in macros defined through core.
|
||||||
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
|
|
||||||
pub use core::{
|
pub use core::{
|
||||||
assert, assert_matches, cfg, column, compile_error, concat, concat_idents, const_format_args,
|
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,
|
env, file, format_args, format_args_nl, include, include_bytes, include_str, line, log_syntax,
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ pub use crate::result::Result::{self, Err, Ok};
|
|||||||
// Re-exported built-in macros
|
// Re-exported built-in macros
|
||||||
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
|
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
pub use core::prelude::v1::{
|
pub use core::prelude::v1::{
|
||||||
assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
|
assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
|
||||||
|
|||||||
@@ -1676,7 +1676,7 @@ impl fmt::Debug for Thread {
|
|||||||
/// [`Result`]: crate::result::Result
|
/// [`Result`]: crate::result::Result
|
||||||
/// [`std::panic::resume_unwind`]: crate::panic::resume_unwind
|
/// [`std::panic::resume_unwind`]: crate::panic::resume_unwind
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[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>>;
|
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
|
// This packet is used to communicate the return value between the spawned
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
// 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(not(bootstrap))]
|
|
||||||
#![cfg(target_has_reliable_f128)]
|
#![cfg(target_has_reliable_f128)]
|
||||||
|
|
||||||
use std::f128::consts;
|
use std::f128::consts;
|
||||||
use std::num::FpCategory as Fp;
|
use std::num::FpCategory as Fp;
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
use std::ops::Rem;
|
use std::ops::Rem;
|
||||||
use std::ops::{Add, Div, Mul, Sub};
|
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
|
/// Tolerances for math that is allowed to be imprecise, usually due to multiple chained
|
||||||
/// operations.
|
/// operations.
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
const TOL_IMPR: f128 = 1e-10;
|
const TOL_IMPR: f128 = 1e-10;
|
||||||
|
|
||||||
@@ -76,7 +73,6 @@ fn test_num_f128() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_num_f128_rem() {
|
fn test_num_f128_rem() {
|
||||||
let ten = 10f128;
|
let ten = 10f128;
|
||||||
@@ -86,7 +82,6 @@ fn test_num_f128_rem() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_min_nan() {
|
fn test_min_nan() {
|
||||||
assert_eq!(f128::NAN.min(2.0), 2.0);
|
assert_eq!(f128::NAN.min(2.0), 2.0);
|
||||||
@@ -95,7 +90,6 @@ fn test_min_nan() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_max_nan() {
|
fn test_max_nan() {
|
||||||
assert_eq!(f128::NAN.max(2.0), 2.0);
|
assert_eq!(f128::NAN.max(2.0), 2.0);
|
||||||
@@ -104,7 +98,6 @@ fn test_max_nan() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_minimum() {
|
fn test_minimum() {
|
||||||
assert!(f128::NAN.minimum(2.0).is_nan());
|
assert!(f128::NAN.minimum(2.0).is_nan());
|
||||||
@@ -113,7 +106,6 @@ fn test_minimum() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_maximum() {
|
fn test_maximum() {
|
||||||
assert!(f128::NAN.maximum(2.0).is_nan());
|
assert!(f128::NAN.maximum(2.0).is_nan());
|
||||||
@@ -272,7 +264,6 @@ fn test_classify() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_floor() {
|
fn test_floor() {
|
||||||
assert_approx_eq!(1.0f128.floor(), 1.0f128, TOL_PRECISE);
|
assert_approx_eq!(1.0f128.floor(), 1.0f128, TOL_PRECISE);
|
||||||
@@ -289,7 +280,6 @@ fn test_floor() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_ceil() {
|
fn test_ceil() {
|
||||||
assert_approx_eq!(1.0f128.ceil(), 1.0f128, TOL_PRECISE);
|
assert_approx_eq!(1.0f128.ceil(), 1.0f128, TOL_PRECISE);
|
||||||
@@ -306,7 +296,6 @@ fn test_ceil() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_round() {
|
fn test_round() {
|
||||||
assert_approx_eq!(2.5f128.round(), 3.0f128, TOL_PRECISE);
|
assert_approx_eq!(2.5f128.round(), 3.0f128, TOL_PRECISE);
|
||||||
@@ -324,7 +313,6 @@ fn test_round() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_round_ties_even() {
|
fn test_round_ties_even() {
|
||||||
assert_approx_eq!(2.5f128.round_ties_even(), 2.0f128, TOL_PRECISE);
|
assert_approx_eq!(2.5f128.round_ties_even(), 2.0f128, TOL_PRECISE);
|
||||||
@@ -342,7 +330,6 @@ fn test_round_ties_even() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_trunc() {
|
fn test_trunc() {
|
||||||
assert_approx_eq!(1.0f128.trunc(), 1.0f128, TOL_PRECISE);
|
assert_approx_eq!(1.0f128.trunc(), 1.0f128, TOL_PRECISE);
|
||||||
@@ -359,7 +346,6 @@ fn test_trunc() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_fract() {
|
fn test_fract() {
|
||||||
assert_approx_eq!(1.0f128.fract(), 0.0f128, TOL_PRECISE);
|
assert_approx_eq!(1.0f128.fract(), 0.0f128, TOL_PRECISE);
|
||||||
@@ -376,7 +362,6 @@ fn test_fract() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_abs() {
|
fn test_abs() {
|
||||||
assert_eq!(f128::INFINITY.abs(), f128::INFINITY);
|
assert_eq!(f128::INFINITY.abs(), f128::INFINITY);
|
||||||
@@ -478,7 +463,6 @@ fn test_next_down() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_mul_add() {
|
fn test_mul_add() {
|
||||||
let nan: f128 = f128::NAN;
|
let nan: f128 = f128::NAN;
|
||||||
@@ -497,7 +481,6 @@ fn test_mul_add() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_recip() {
|
fn test_recip() {
|
||||||
let nan: f128 = f128::NAN;
|
let nan: f128 = f128::NAN;
|
||||||
@@ -521,7 +504,6 @@ fn test_recip() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_powi() {
|
fn test_powi() {
|
||||||
let nan: f128 = f128::NAN;
|
let nan: f128 = f128::NAN;
|
||||||
@@ -538,7 +520,6 @@ fn test_powi() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_powf() {
|
fn test_powf() {
|
||||||
let nan: f128 = f128::NAN;
|
let nan: f128 = f128::NAN;
|
||||||
@@ -557,7 +538,6 @@ fn test_powf() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_sqrt_domain() {
|
fn test_sqrt_domain() {
|
||||||
assert!(f128::NAN.sqrt().is_nan());
|
assert!(f128::NAN.sqrt().is_nan());
|
||||||
@@ -571,7 +551,6 @@ fn test_sqrt_domain() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_exp() {
|
fn test_exp() {
|
||||||
assert_eq!(1.0, 0.0f128.exp());
|
assert_eq!(1.0, 0.0f128.exp());
|
||||||
@@ -588,7 +567,6 @@ fn test_exp() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_exp2() {
|
fn test_exp2() {
|
||||||
assert_eq!(32.0, 5.0f128.exp2());
|
assert_eq!(32.0, 5.0f128.exp2());
|
||||||
@@ -604,7 +582,6 @@ fn test_exp2() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_ln() {
|
fn test_ln() {
|
||||||
let nan: f128 = f128::NAN;
|
let nan: f128 = f128::NAN;
|
||||||
@@ -622,7 +599,6 @@ fn test_ln() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_log() {
|
fn test_log() {
|
||||||
let nan: f128 = f128::NAN;
|
let nan: f128 = f128::NAN;
|
||||||
@@ -643,7 +619,6 @@ fn test_log() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_log2() {
|
fn test_log2() {
|
||||||
let nan: f128 = f128::NAN;
|
let nan: f128 = f128::NAN;
|
||||||
@@ -662,7 +637,6 @@ fn test_log2() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_log10() {
|
fn test_log10() {
|
||||||
let nan: f128 = f128::NAN;
|
let nan: f128 = f128::NAN;
|
||||||
@@ -714,7 +688,6 @@ fn test_to_radians() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_asinh() {
|
fn test_asinh() {
|
||||||
// Lower accuracy results are allowed, use increased tolerances
|
// Lower accuracy results are allowed, use increased tolerances
|
||||||
@@ -747,7 +720,6 @@ fn test_asinh() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_acosh() {
|
fn test_acosh() {
|
||||||
assert_eq!(1.0f128.acosh(), 0.0f128);
|
assert_eq!(1.0f128.acosh(), 0.0f128);
|
||||||
@@ -768,7 +740,6 @@ fn test_acosh() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_atanh() {
|
fn test_atanh() {
|
||||||
assert_eq!(0.0f128.atanh(), 0.0f128);
|
assert_eq!(0.0f128.atanh(), 0.0f128);
|
||||||
@@ -790,7 +761,6 @@ fn test_atanh() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_gamma() {
|
fn test_gamma() {
|
||||||
// precision can differ among platforms
|
// precision can differ among platforms
|
||||||
@@ -813,7 +783,6 @@ fn test_gamma() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
fn test_ln_gamma() {
|
fn test_ln_gamma() {
|
||||||
assert_approx_eq!(1.0f128.ln_gamma().0, 0.0f128, TOL_IMPR);
|
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);
|
assert_approx_eq!(frac_2_pi, 2f128 / pi, TOL_PRECISE);
|
||||||
|
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f128_math)]
|
#[cfg(target_has_reliable_f128_math)]
|
||||||
{
|
{
|
||||||
let frac_2_sqrtpi: f128 = consts::FRAC_2_SQRT_PI;
|
let frac_2_sqrtpi: f128 = consts::FRAC_2_SQRT_PI;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// 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(not(bootstrap))]
|
|
||||||
#![cfg(target_has_reliable_f16)]
|
#![cfg(target_has_reliable_f16)]
|
||||||
|
|
||||||
use std::f16::consts;
|
use std::f16::consts;
|
||||||
@@ -63,7 +62,6 @@ fn test_num_f16() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_min_nan() {
|
fn test_min_nan() {
|
||||||
assert_eq!(f16::NAN.min(2.0), 2.0);
|
assert_eq!(f16::NAN.min(2.0), 2.0);
|
||||||
@@ -72,7 +70,6 @@ fn test_min_nan() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_max_nan() {
|
fn test_max_nan() {
|
||||||
assert_eq!(f16::NAN.max(2.0), 2.0);
|
assert_eq!(f16::NAN.max(2.0), 2.0);
|
||||||
@@ -81,7 +78,6 @@ fn test_max_nan() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_minimum() {
|
fn test_minimum() {
|
||||||
assert!(f16::NAN.minimum(2.0).is_nan());
|
assert!(f16::NAN.minimum(2.0).is_nan());
|
||||||
@@ -90,7 +86,6 @@ fn test_minimum() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_maximum() {
|
fn test_maximum() {
|
||||||
assert!(f16::NAN.maximum(2.0).is_nan());
|
assert!(f16::NAN.maximum(2.0).is_nan());
|
||||||
@@ -249,7 +244,6 @@ fn test_classify() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_floor() {
|
fn test_floor() {
|
||||||
assert_approx_eq!(1.0f16.floor(), 1.0f16, TOL_0);
|
assert_approx_eq!(1.0f16.floor(), 1.0f16, TOL_0);
|
||||||
@@ -266,7 +260,6 @@ fn test_floor() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_ceil() {
|
fn test_ceil() {
|
||||||
assert_approx_eq!(1.0f16.ceil(), 1.0f16, TOL_0);
|
assert_approx_eq!(1.0f16.ceil(), 1.0f16, TOL_0);
|
||||||
@@ -283,7 +276,6 @@ fn test_ceil() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_round() {
|
fn test_round() {
|
||||||
assert_approx_eq!(2.5f16.round(), 3.0f16, TOL_0);
|
assert_approx_eq!(2.5f16.round(), 3.0f16, TOL_0);
|
||||||
@@ -301,7 +293,6 @@ fn test_round() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_round_ties_even() {
|
fn test_round_ties_even() {
|
||||||
assert_approx_eq!(2.5f16.round_ties_even(), 2.0f16, TOL_0);
|
assert_approx_eq!(2.5f16.round_ties_even(), 2.0f16, TOL_0);
|
||||||
@@ -319,7 +310,6 @@ fn test_round_ties_even() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_trunc() {
|
fn test_trunc() {
|
||||||
assert_approx_eq!(1.0f16.trunc(), 1.0f16, TOL_0);
|
assert_approx_eq!(1.0f16.trunc(), 1.0f16, TOL_0);
|
||||||
@@ -336,7 +326,6 @@ fn test_trunc() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_fract() {
|
fn test_fract() {
|
||||||
assert_approx_eq!(1.0f16.fract(), 0.0f16, TOL_0);
|
assert_approx_eq!(1.0f16.fract(), 0.0f16, TOL_0);
|
||||||
@@ -353,7 +342,6 @@ fn test_fract() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_abs() {
|
fn test_abs() {
|
||||||
assert_eq!(f16::INFINITY.abs(), f16::INFINITY);
|
assert_eq!(f16::INFINITY.abs(), f16::INFINITY);
|
||||||
@@ -455,7 +443,6 @@ fn test_next_down() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_mul_add() {
|
fn test_mul_add() {
|
||||||
let nan: f16 = f16::NAN;
|
let nan: f16 = f16::NAN;
|
||||||
@@ -474,7 +461,6 @@ fn test_mul_add() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_recip() {
|
fn test_recip() {
|
||||||
let nan: f16 = f16::NAN;
|
let nan: f16 = f16::NAN;
|
||||||
@@ -492,7 +478,6 @@ fn test_recip() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_powi() {
|
fn test_powi() {
|
||||||
let nan: f16 = f16::NAN;
|
let nan: f16 = f16::NAN;
|
||||||
@@ -509,7 +494,6 @@ fn test_powi() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_powf() {
|
fn test_powf() {
|
||||||
let nan: f16 = f16::NAN;
|
let nan: f16 = f16::NAN;
|
||||||
@@ -528,7 +512,6 @@ fn test_powf() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_sqrt_domain() {
|
fn test_sqrt_domain() {
|
||||||
assert!(f16::NAN.sqrt().is_nan());
|
assert!(f16::NAN.sqrt().is_nan());
|
||||||
@@ -542,7 +525,6 @@ fn test_sqrt_domain() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_exp() {
|
fn test_exp() {
|
||||||
assert_eq!(1.0, 0.0f16.exp());
|
assert_eq!(1.0, 0.0f16.exp());
|
||||||
@@ -559,7 +541,6 @@ fn test_exp() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_exp2() {
|
fn test_exp2() {
|
||||||
assert_eq!(32.0, 5.0f16.exp2());
|
assert_eq!(32.0, 5.0f16.exp2());
|
||||||
@@ -575,7 +556,6 @@ fn test_exp2() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_ln() {
|
fn test_ln() {
|
||||||
let nan: f16 = f16::NAN;
|
let nan: f16 = f16::NAN;
|
||||||
@@ -593,7 +573,6 @@ fn test_ln() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_log() {
|
fn test_log() {
|
||||||
let nan: f16 = f16::NAN;
|
let nan: f16 = f16::NAN;
|
||||||
@@ -614,7 +593,6 @@ fn test_log() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_log2() {
|
fn test_log2() {
|
||||||
let nan: f16 = f16::NAN;
|
let nan: f16 = f16::NAN;
|
||||||
@@ -633,7 +611,6 @@ fn test_log2() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_log10() {
|
fn test_log10() {
|
||||||
let nan: f16 = f16::NAN;
|
let nan: f16 = f16::NAN;
|
||||||
@@ -683,7 +660,6 @@ fn test_to_radians() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_asinh() {
|
fn test_asinh() {
|
||||||
assert_eq!(0.0f16.asinh(), 0.0f16);
|
assert_eq!(0.0f16.asinh(), 0.0f16);
|
||||||
@@ -710,7 +686,6 @@ fn test_asinh() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_acosh() {
|
fn test_acosh() {
|
||||||
assert_eq!(1.0f16.acosh(), 0.0f16);
|
assert_eq!(1.0f16.acosh(), 0.0f16);
|
||||||
@@ -731,7 +706,6 @@ fn test_acosh() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_atanh() {
|
fn test_atanh() {
|
||||||
assert_eq!(0.0f16.atanh(), 0.0f16);
|
assert_eq!(0.0f16.atanh(), 0.0f16);
|
||||||
@@ -753,7 +727,6 @@ fn test_atanh() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_gamma() {
|
fn test_gamma() {
|
||||||
// precision can differ among platforms
|
// precision can differ among platforms
|
||||||
@@ -776,7 +749,6 @@ fn test_gamma() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_ln_gamma() {
|
fn test_ln_gamma() {
|
||||||
assert_approx_eq!(1.0f16.ln_gamma().0, 0.0f16, TOL_0);
|
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);
|
assert_approx_eq!(frac_2_pi, 2f16 / pi, TOL_0);
|
||||||
|
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
{
|
{
|
||||||
let frac_2_sqrtpi: f16 = consts::FRAC_2_SQRT_PI;
|
let frac_2_sqrtpi: f16 = consts::FRAC_2_SQRT_PI;
|
||||||
@@ -874,7 +845,6 @@ fn test_clamp_max_is_nan() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(miri))]
|
#[cfg(not(miri))]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
#[cfg(target_has_reliable_f16_math)]
|
#[cfg(target_has_reliable_f16_math)]
|
||||||
fn test_total_cmp() {
|
fn test_total_cmp() {
|
||||||
use core::cmp::Ordering;
|
use core::cmp::Ordering;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#![feature(f16, f128, float_algebraic, float_gamma, float_minimum_maximum)]
|
#![feature(f16, f128, float_algebraic, float_gamma, float_minimum_maximum)]
|
||||||
#![cfg_attr(not(bootstrap), feature(cfg_target_has_reliable_f16_f128))]
|
#![feature(cfg_target_has_reliable_f16_f128)]
|
||||||
#![cfg_attr(not(bootstrap), expect(internal_features))] // for reliable_f16_f128
|
#![expect(internal_features)] // for reliable_f16_f128
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::ops::{Add, Div, Mul, Rem, Sub};
|
use std::ops::{Add, Div, Mul, Rem, Sub};
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ fn main() {
|
|||||||
let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set");
|
let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set");
|
||||||
let on_fail = env::var_os("RUSTC_ON_FAIL").map(Command::new);
|
let on_fail = env::var_os("RUSTC_ON_FAIL").map(Command::new);
|
||||||
|
|
||||||
let rustc_real = env::var_os(rustc).unwrap_or_else(|| panic!("{:?} was not set", rustc));
|
let rustc_real = env::var_os(rustc).unwrap_or_else(|| panic!("{rustc:?} was not set"));
|
||||||
let libdir = env::var_os(libdir).unwrap_or_else(|| panic!("{:?} was not set", libdir));
|
let libdir = env::var_os(libdir).unwrap_or_else(|| panic!("{libdir:?} was not set"));
|
||||||
let mut dylib_path = dylib_path();
|
let mut dylib_path = dylib_path();
|
||||||
dylib_path.insert(0, PathBuf::from(&libdir));
|
dylib_path.insert(0, PathBuf::from(&libdir));
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ fn clean_specific_stage(build: &Build, stage: u32) {
|
|||||||
|
|
||||||
for entry in entries {
|
for entry in entries {
|
||||||
let entry = t!(entry);
|
let entry = t!(entry);
|
||||||
let stage_prefix = format!("stage{}", stage);
|
let stage_prefix = format!("stage{stage}");
|
||||||
|
|
||||||
// if current entry is not related with the target stage, continue
|
// if current entry is not related with the target stage, continue
|
||||||
if !entry.file_name().to_str().unwrap_or("").contains(&stage_prefix) {
|
if !entry.file_name().to_str().unwrap_or("").contains(&stage_prefix) {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ fn lint_args(builder: &Builder<'_>, config: &LintConfig, ignored_rules: &[&str])
|
|||||||
let all_args = std::env::args().collect::<Vec<_>>();
|
let all_args = std::env::args().collect::<Vec<_>>();
|
||||||
args.extend(get_clippy_rules_in_order(&all_args, config));
|
args.extend(get_clippy_rules_in_order(&all_args, config));
|
||||||
|
|
||||||
args.extend(ignored_rules.iter().map(|lint| format!("-Aclippy::{}", lint)));
|
args.extend(ignored_rules.iter().map(|lint| format!("-Aclippy::{lint}")));
|
||||||
args.extend(builder.config.free_args.clone());
|
args.extend(builder.config.free_args.clone());
|
||||||
args
|
args
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1771,7 +1771,7 @@ impl Step for Sysroot {
|
|||||||
} else if builder.download_rustc() && compiler.stage != builder.top_stage {
|
} else if builder.download_rustc() && compiler.stage != builder.top_stage {
|
||||||
host_dir.join("ci-rustc-sysroot")
|
host_dir.join("ci-rustc-sysroot")
|
||||||
} else {
|
} else {
|
||||||
host_dir.join(format!("stage{}", stage))
|
host_dir.join(format!("stage{stage}"))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let sysroot = sysroot_dir(compiler.stage);
|
let sysroot = sysroot_dir(compiler.stage);
|
||||||
|
|||||||
@@ -1403,14 +1403,14 @@ impl Step for CodegenBackend {
|
|||||||
let backend = self.backend;
|
let backend = self.backend;
|
||||||
|
|
||||||
let mut tarball =
|
let mut tarball =
|
||||||
Tarball::new(builder, &format!("rustc-codegen-{}", backend), &compiler.host.triple);
|
Tarball::new(builder, &format!("rustc-codegen-{backend}"), &compiler.host.triple);
|
||||||
if backend == "cranelift" {
|
if backend == "cranelift" {
|
||||||
tarball.set_overlay(OverlayKind::RustcCodegenCranelift);
|
tarball.set_overlay(OverlayKind::RustcCodegenCranelift);
|
||||||
} else {
|
} else {
|
||||||
panic!("Unknown backend rustc_codegen_{}", backend);
|
panic!("Unknown backend rustc_codegen_{backend}");
|
||||||
}
|
}
|
||||||
tarball.is_preview(true);
|
tarball.is_preview(true);
|
||||||
tarball.add_legal_and_readme_to(format!("share/doc/rustc_codegen_{}", backend));
|
tarball.add_legal_and_readme_to(format!("share/doc/rustc_codegen_{backend}"));
|
||||||
|
|
||||||
let src = builder.sysroot(compiler);
|
let src = builder.sysroot(compiler);
|
||||||
let backends_src = builder.sysroot_codegen_backends(compiler);
|
let backends_src = builder.sysroot_codegen_backends(compiler);
|
||||||
@@ -1422,7 +1422,7 @@ impl Step for CodegenBackend {
|
|||||||
// Don't use custom libdir here because ^lib/ will be resolved again with installer
|
// Don't use custom libdir here because ^lib/ will be resolved again with installer
|
||||||
let backends_dst = PathBuf::from("lib").join(backends_rel);
|
let backends_dst = PathBuf::from("lib").join(backends_rel);
|
||||||
|
|
||||||
let backend_name = format!("rustc_codegen_{}", backend);
|
let backend_name = format!("rustc_codegen_{backend}");
|
||||||
let mut found_backend = false;
|
let mut found_backend = false;
|
||||||
for backend in fs::read_dir(&backends_src).unwrap() {
|
for backend in fs::read_dir(&backends_src).unwrap() {
|
||||||
let file_name = backend.unwrap().file_name();
|
let file_name = backend.unwrap().file_name();
|
||||||
@@ -1623,7 +1623,7 @@ impl Step for Extended {
|
|||||||
let pkgbuild = |component: &str| {
|
let pkgbuild = |component: &str| {
|
||||||
let mut cmd = command("pkgbuild");
|
let mut cmd = command("pkgbuild");
|
||||||
cmd.arg("--identifier")
|
cmd.arg("--identifier")
|
||||||
.arg(format!("org.rust-lang.{}", component))
|
.arg(format!("org.rust-lang.{component}"))
|
||||||
.arg("--scripts")
|
.arg("--scripts")
|
||||||
.arg(pkg.join(component))
|
.arg(pkg.join(component))
|
||||||
.arg("--nopayload")
|
.arg("--nopayload")
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ fn is_dir_writable_for_user(dir: &Path) -> bool {
|
|||||||
if e.kind() == std::io::ErrorKind::PermissionDenied {
|
if e.kind() == std::io::ErrorKind::PermissionDenied {
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
panic!("Failed the write access check for the current user. {}", e);
|
panic!("Failed the write access check for the current user. {e}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -870,8 +870,8 @@ fn get_var(var_base: &str, host: &str, target: &str) -> Option<OsString> {
|
|||||||
let kind = if host == target { "HOST" } else { "TARGET" };
|
let kind = if host == target { "HOST" } else { "TARGET" };
|
||||||
let target_u = target.replace('-', "_");
|
let target_u = target.replace('-', "_");
|
||||||
env::var_os(format!("{var_base}_{target}"))
|
env::var_os(format!("{var_base}_{target}"))
|
||||||
.or_else(|| env::var_os(format!("{}_{}", var_base, target_u)))
|
.or_else(|| env::var_os(format!("{var_base}_{target_u}")))
|
||||||
.or_else(|| env::var_os(format!("{}_{}", kind, var_base)))
|
.or_else(|| env::var_os(format!("{kind}_{var_base}")))
|
||||||
.or_else(|| env::var_os(var_base))
|
.or_else(|| env::var_os(var_base))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -944,7 +944,7 @@ impl Step for Enzyme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
trace!(?target, "(re)building enzyme artifacts");
|
trace!(?target, "(re)building enzyme artifacts");
|
||||||
builder.info(&format!("Building Enzyme for {}", target));
|
builder.info(&format!("Building Enzyme for {target}"));
|
||||||
t!(stamp.remove());
|
t!(stamp.remove());
|
||||||
let _time = helpers::timeit(builder);
|
let _time = helpers::timeit(builder);
|
||||||
t!(fs::create_dir_all(&out_dir));
|
t!(fs::create_dir_all(&out_dir));
|
||||||
@@ -1229,10 +1229,9 @@ fn supported_sanitizers(
|
|||||||
components
|
components
|
||||||
.iter()
|
.iter()
|
||||||
.map(move |c| SanitizerRuntime {
|
.map(move |c| SanitizerRuntime {
|
||||||
cmake_target: format!("clang_rt.{}_{}_dynamic", c, os),
|
cmake_target: format!("clang_rt.{c}_{os}_dynamic"),
|
||||||
path: out_dir
|
path: out_dir.join(format!("build/lib/darwin/libclang_rt.{c}_{os}_dynamic.dylib")),
|
||||||
.join(format!("build/lib/darwin/libclang_rt.{}_{}_dynamic.dylib", c, os)),
|
name: format!("librustc-{channel}_rt.{c}.dylib"),
|
||||||
name: format!("librustc-{}_rt.{}.dylib", channel, c),
|
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
};
|
};
|
||||||
@@ -1241,9 +1240,9 @@ fn supported_sanitizers(
|
|||||||
components
|
components
|
||||||
.iter()
|
.iter()
|
||||||
.map(move |c| SanitizerRuntime {
|
.map(move |c| SanitizerRuntime {
|
||||||
cmake_target: format!("clang_rt.{}-{}", c, arch),
|
cmake_target: format!("clang_rt.{c}-{arch}"),
|
||||||
path: out_dir.join(format!("build/lib/{}/libclang_rt.{}-{}.a", os, c, arch)),
|
path: out_dir.join(format!("build/lib/{os}/libclang_rt.{c}-{arch}.a")),
|
||||||
name: format!("librustc-{}_rt.{}.a", channel, c),
|
name: format!("librustc-{channel}_rt.{c}.a"),
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
};
|
};
|
||||||
@@ -1362,8 +1361,8 @@ impl Step for CrtBeginEnd {
|
|||||||
for obj in objs {
|
for obj in objs {
|
||||||
let base_name = unhashed_basename(&obj);
|
let base_name = unhashed_basename(&obj);
|
||||||
assert!(base_name == "crtbegin" || base_name == "crtend");
|
assert!(base_name == "crtbegin" || base_name == "crtend");
|
||||||
t!(fs::copy(&obj, out_dir.join(format!("{}S.o", base_name))));
|
t!(fs::copy(&obj, out_dir.join(format!("{base_name}S.o"))));
|
||||||
t!(fs::rename(&obj, out_dir.join(format!("{}.o", base_name))));
|
t!(fs::rename(&obj, out_dir.join(format!("{base_name}.o"))));
|
||||||
}
|
}
|
||||||
|
|
||||||
out_dir
|
out_dir
|
||||||
|
|||||||
@@ -552,7 +552,7 @@ Select which editor you would like to set up [default: None]: ";
|
|||||||
|
|
||||||
let mut input = String::new();
|
let mut input = String::new();
|
||||||
loop {
|
loop {
|
||||||
print!("{}", prompt_str);
|
print!("{prompt_str}");
|
||||||
io::stdout().flush()?;
|
io::stdout().flush()?;
|
||||||
io::stdin().read_line(&mut input)?;
|
io::stdin().read_line(&mut input)?;
|
||||||
|
|
||||||
@@ -764,7 +764,7 @@ fn create_editor_settings_maybe(config: &Config, editor: &EditorKind) -> io::Res
|
|||||||
_ => "Created",
|
_ => "Created",
|
||||||
};
|
};
|
||||||
fs::write(&settings_path, editor.settings_template())?;
|
fs::write(&settings_path, editor.settings_template())?;
|
||||||
println!("{verb} `{}`", settings_filename);
|
println!("{verb} `{settings_filename}`");
|
||||||
} else {
|
} else {
|
||||||
println!("\n{}", editor.settings_template());
|
println!("\n{}", editor.settings_template());
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user