about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-10 06:28:45 +0100
committerGitHub <noreply@github.com>2024-01-10 06:28:45 +0100
commit3fcddf19e7f010129e3f39fbfddaf74cc7c0cca3 (patch)
treee3d4a0ca7c4cf47b76d715ddbd8ba387f8958fee
parent4571ef915209086f3969494f74889881b3b67a8b (diff)
parentfa5bef849e1224b4f086ca70931ea811380e1943 (diff)
Rollup merge of #119782 - RalfJung:rint, r=cuviper
rint intrinsics: caution against actually trying to check for floating-point exceptions
-rw-r--r--library/core/src/intrinsics.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs
index 3d5b544bc1b..3df3e8ea05c 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)