rust/src/tools
Ruan Comelli f8e97badb2
Add const support for float rounding methods
Add const support for the float rounding methods floor, ceil, trunc,
fract, round and round_ties_even.
This works by moving the calculation logic from

     src/tools/miri/src/intrinsics/mod.rs

into

     compiler/rustc_const_eval/src/interpret/intrinsics.rs.

All relevant method definitions were adjusted to include the `const`
keyword for all supported float types: f16, f32, f64 and f128.

The constness is hidden behind the feature gate

     feature(const_float_round_methods)

which is tracked in

     https://github.com/rust-lang/rust/issues/141555

This commit is a squash of the following commits:
- test: add tests that we expect to pass when float rounding becomes const
- feat: make float rounding methods `const`
- fix: replace `rustc_allow_const_fn_unstable(core_intrinsics)` attribute with `#[rustc_const_unstable(feature = "f128", issue = "116909")]` in `library/core/src/num/f128.rs`
- revert: undo update to `library/stdarch`
- refactor: replace multiple `float_<mode>_intrinsic` rounding methods with a single, parametrized one
- fix: add `#[cfg(not(bootstrap))]` to new const method tests
- test: add extra sign tests to check `+0.0` and `-0.0`
- revert: undo accidental changes to `round` docs
- fix: gate `const` float round method behind `const_float_round_methods`
- fix: remove unnecessary `#![feature(const_float_methods)]`
- fix: remove unnecessary `#![feature(const_float_methods)]` [2]
- revert: undo changes to `tests/ui/consts/const-eval/float_methods.rs`
- fix: adjust after rebase
- test: fix float tests
- test: add tests for `fract`
- chore: add commented-out `const_float_round_methods` feature gates to `f16` and `f128`
- fix: adjust NaN when rounding floats
- chore: add FIXME comment for de-duplicating float tests
- test: remove unnecessary test file `tests/ui/consts/const-eval/float_methods.rs`
- test: fix tests after upstream simplification of how float tests are run
2025-05-31 15:26:57 -03:00
..
build-manifest remove rls specific parts from tidy and build-manifest 2025-03-12 09:13:56 +03:00
bump-stage0 Remove git_repository field from GitConfig 2025-04-23 10:41:20 +02:00
cargo@64a1246070 Update cargo 2025-05-30 17:23:09 -04:00
cargotest
clippy Auto merge of #141717 - jhpratt:rollup-neu8nzl, r=jhpratt 2025-05-29 08:53:27 +00:00
collect-license-metadata
compiletest compiler & tools: bump windows crate to dedupe versions 2025-05-17 15:26:38 +03:00
coverage-dump Update miniz_oxide dependency of coverage_dump 2025-05-10 18:35:20 +02:00
enzyme@a35f4f7731 update enzyme to handle range metadata 2025-02-28 03:53:22 -05:00
error_index_generator Move error_index_generator to the rustbook workspace 2025-02-17 10:58:15 -08:00
features-status-dump Remove backtrace dep from anyhow in features status dump tool 2025-05-01 07:45:47 -04:00
generate-copyright Update askama version to 0.14.0 in generate-copyright tool 2025-05-24 12:28:50 +02:00
generate-windows-sys Update windows-bindgen to 0.61.0 2025-04-04 16:41:40 +00:00
html-checker
jsondocck jsondocck: Require command is at start of line 2025-04-20 11:37:00 +00:00
jsondoclint rustdoc: Output target feature information 2025-04-15 21:26:14 -05:00
libcxx-version
linkchecker bump html5ever to 0.29 with deps 2025-03-13 19:59:53 +03:00
lint-docs Avoid including text direction codepoints in lint messages 2025-05-27 15:57:41 +00:00
lld-wrapper
llvm-bitcode-linker Pass through of target features to llvm-bitcode-linker and handling them 2025-02-16 21:57:03 +01:00
miri Add const support for float rounding methods 2025-05-31 15:26:57 -03:00
miropt-test-tools
nix-dev-shell Deduplicate nix code 2025-04-17 00:01:04 -04:00
opt-dist Bump rustc-perf and update PGO crates 2025-05-29 09:00:36 +00:00
remote-test-client
remote-test-server
replace-version-placeholder Include rustc and rustdoc book in replace-version-placeholder 2025-01-07 22:46:18 +01:00
run-make-support run-make-support: support "ejecting" the underlying std command 2025-05-09 19:54:35 +08:00
rust-analyzer Merge pull request #19881 from Veykril/push-wsrmttkymyps 2025-05-28 09:23:27 +00:00
rust-installer Rustfmt 2025-02-08 22:12:13 +00:00
rustbook rustbook: Bump versions of onig and onig_sys 2025-05-28 15:36:32 +03:00
rustc-perf@6a70166b92 Bump rustc-perf and update PGO crates 2025-05-29 09:00:36 +00:00
rustdoc librustdoc: 2024 edition! 🎊 2025-03-04 12:35:18 +02:00
rustdoc-gui Update browser-ui-test version to 0.20.2 2025-02-05 17:06:38 +01:00
rustdoc-gui-test Improve error output in case nodejs or npm is not installed for rustdoc-gui test suite 2025-05-01 17:42:22 +02:00
rustdoc-js tester.js: ignore displayTypeSignature if it is null 2025-03-27 16:00:44 -05:00
rustdoc-themes
rustfmt Rollup merge of #141675 - nnethercote:ItemKind-field-order, r=fee1-dead 2025-05-29 04:49:43 +02:00
suggest-tests Remove git_repository field from GitConfig 2025-04-23 10:41:20 +02:00
tidy Rollup merge of #141705 - GuillaumeGomez:eslint-tidy, r=Kobzol 2025-05-29 17:03:00 +02:00
tier-check
unicode-table-generator Remove unneeded parentheses. 2025-03-08 12:56:00 +01:00
unstable-book-gen Rollup merge of #141526 - jyn514:env-vars, r=petrochenkov 2025-05-27 01:29:21 +08:00
wasm-component-ld Update wasm-component-ld to 0.5.13 2025-04-23 14:37:17 -07:00
x Add src/tools/x to the main workspace 2025-03-13 12:18:32 -07:00
cherry-pick.sh
publish_toolstate.py Update toolstate maintainers 2025-01-23 09:55:21 -08:00