From fa5bef849e1224b4f086ca70931ea811380e1943 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 9 Jan 2024 22:00:03 +0100 Subject: [PATCH] rint intrinsics: caution against actually trying to check for floating-point exceptions --- library/core/src/intrinsics.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 3d5b544bc1bc1..3df3e8ea05cdb 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -1787,6 +1787,8 @@ extern "rust-intrinsic" { /// so this rounds half-way cases to the number with an even least significant digit. /// /// May raise an inexact floating-point exception if the argument is not an integer. + /// However, Rust assumes floating-point exceptions cannot be observed, so this is not something that + /// can actually be used from Rust code. /// /// The stabilized version of this intrinsic is /// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even) @@ -1796,6 +1798,8 @@ extern "rust-intrinsic" { /// so this rounds half-way cases to the number with an even least significant digit. /// /// May raise an inexact floating-point exception if the argument is not an integer. + /// However, Rust assumes floating-point exceptions cannot be observed, so this is not something that + /// can actually be used from Rust code. /// /// The stabilized version of this intrinsic is /// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)