-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rint intrinsics: caution against actually trying to check for floating-point exceptions #119782
Conversation
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
…g-point exceptions
@bors r+ rollup |
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#106893 (Explain base expression for struct update syntax) - rust-lang#119769 (rustdoc: offset generic args of cross-crate trait object types when cleaning) - rust-lang#119772 (Fix an ICE that occurs after an error has already been reported) - rust-lang#119782 (rint intrinsics: caution against actually trying to check for floating-point exceptions) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119782 - RalfJung:rint, r=cuviper rint intrinsics: caution against actually trying to check for floating-point exceptions
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhat ambiguous what "this" in "this is not something that can actually be used" is. Is it this intrinsic itself? Or the very fact that the exceptions might be raised and you cannot utilize this fact for anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was clear to me that "this" meant the raised exception, but we can always tweak it further!
No description provided.