From b9d0555d11736f96b4fbbb83bfed94a7098a9ba7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 23 Feb 2025 10:57:44 +0100 Subject: [PATCH] add stdarch compatibility hack --- library/core/src/intrinsics/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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. ///