Skip to content

Commit b9d0555

Browse files
committed
add stdarch compatibility hack
1 parent d1b34ac commit b9d0555

File tree

1 file changed

+12
-0
lines changed
  • library/core/src/intrinsics

1 file changed

+12
-0
lines changed

Diff for: library/core/src/intrinsics/mod.rs

+12
Original file line numberDiff line numberDiff line change
@@ -2793,6 +2793,12 @@ pub fn round_ties_even_f32(x: f32) -> f32 {
27932793
unsafe { rintf32(x) }
27942794
}
27952795

2796+
/// Provided for compatibility with stdarch. DO NOT USE.
2797+
#[inline(always)]
2798+
pub unsafe fn rintf32(x: f32) -> f32 {
2799+
round_ties_even_f32(x)
2800+
}
2801+
27962802
/// Returns the nearest integer to an `f64`. Rounds half-way cases to the number with an even
27972803
/// least significant digit.
27982804
///
@@ -2820,6 +2826,12 @@ pub fn round_ties_even_f64(x: f64) -> f64 {
28202826
unsafe { rintf64(x) }
28212827
}
28222828

2829+
/// Provided for compatibility with stdarch. DO NOT USE.
2830+
#[inline(always)]
2831+
pub unsafe fn rintf64(x: f64) -> f64 {
2832+
round_ties_even_f64(x)
2833+
}
2834+
28232835
/// Returns the nearest integer to an `f128`. Rounds half-way cases to the number with an even
28242836
/// least significant digit.
28252837
///

0 commit comments

Comments
 (0)