diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-06-01 00:35:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-01 00:35:53 +0200 |
| commit | ac49339e03d93308bcf597cf1802768e79417688 (patch) | |
| tree | 15656d12b8514211a711dccbe7aa9e283deaa5dc /compiler/rustc_codegen_llvm/src | |
| parent | c4ba6b00cc3eee2762c20ba4be85b2b7f0c6a407 (diff) | |
| parent | f8e97badb26f1436d062b3bfdd4f50adc41b843a (diff) | |
| download | rust-ac49339e03d93308bcf597cf1802768e79417688.tar.gz rust-ac49339e03d93308bcf597cf1802768e79417688.zip | |
Rollup merge of #141521 - ruancomelli:const-float-rounding, r=RalfJung
Add `const` support for float rounding methods
# Add `const` support for float rounding methods
This PR makes the following float rounding methods `const`:
- `f64::{floor, ceil, trunc, round, round_ties_even}`
- and the corresponding methods for `f16`, `f32` and `f128`
Tracking issue: https://github.com/rust-lang/rust/issues/141555
## Procedure
I followed https://github.com/rust-lang/rust/commit/c09ed3e767a73d83673790f74c357432fa44d320 as closely as I could in making float methods `const`, and also received great guidance from https://internals.rust-lang.org/t/const-rounding-methods-in-float-types/22957/3?u=ruancomelli.
## Note
This is my first code contribution to the Rust project, so please let me know if I missed anything - I'd be more than happy to revise and learn more. Thank you for taking the time to review it!
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
