diff options
| author | Ralf Jung <post@ralfj.de> | 2025-02-23 10:57:44 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-02-23 11:53:49 +0100 |
| commit | b9d0555d11736f96b4fbbb83bfed94a7098a9ba7 (patch) | |
| tree | 8200c9f022dc2062ccbf5416f79c72e1aa5c1573 | |
| parent | d1b34acb3bfa202704b5ab13e4b35eb569cf7d67 (diff) | |
| download | rust-b9d0555d11736f96b4fbbb83bfed94a7098a9ba7.tar.gz rust-b9d0555d11736f96b4fbbb83bfed94a7098a9ba7.zip | |
add stdarch compatibility hack
| -rw-r--r-- | library/core/src/intrinsics/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs index a52f2b20246..a6d6ad572dd 100644 --- a/library/core/src/intrinsics/mod.rs +++ b/library/core/src/intrinsics/mod.rs @@ -2793,6 +2793,12 @@ pub fn round_ties_even_f32(x: f32) -> f32 { unsafe { rintf32(x) } } +/// Provided for compatibility with stdarch. DO NOT USE. +#[inline(always)] +pub unsafe fn rintf32(x: f32) -> f32 { + round_ties_even_f32(x) +} + /// Returns the nearest integer to an `f64`. Rounds half-way cases to the number with an even /// least significant digit. /// @@ -2820,6 +2826,12 @@ pub fn round_ties_even_f64(x: f64) -> f64 { unsafe { rintf64(x) } } +/// Provided for compatibility with stdarch. DO NOT USE. +#[inline(always)] +pub unsafe fn rintf64(x: f64) -> f64 { + round_ties_even_f64(x) +} + /// Returns the nearest integer to an `f128`. Rounds half-way cases to the number with an even /// least significant digit. /// |
