-
Couldn't load subscription status.
- Fork 13.9k
Make missed precondition-free float intrinsics safe #146915
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
Conversation
| /// [`f16::abs`](../../std/primitive.f16.html#method.abs) | ||
| #[rustc_nounwind] | ||
| #[rustc_intrinsic] | ||
| pub const unsafe fn fabsf16(x: f16) -> f16; |
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.
Side remark: fabsf16 and fabsf128 aren't used in their corresponding fn abs definitions, so, I'm assuming they're "not ready yet" in that sense. However, they can still be marked safe for consistency.
|
r=me with that comment removed. |
4260757 to
e8a8e06
Compare
|
Comment is now fixed |
|
Thanks! |
…alfJung Make missed precondition-free float intrinsics safe So, in my defence, these were both separated out from the other intrinsics in the file *and* had a different safety comment in the stable versions, so, I didn't notice them before. But, in my offence, the entire reason I did the previous PR was because I was using them for SIMD intrinsic fallbacks, and `fabs` is needed for those too, so, I don't really have an excuse. Extra follow-up to rust-lang#146683. r? `@RalfJung` who reviewed the previous one These don't appear to be used anywhere outside of the standard locations, at least.
…alfJung Make missed precondition-free float intrinsics safe So, in my defence, these were both separated out from the other intrinsics in the file *and* had a different safety comment in the stable versions, so, I didn't notice them before. But, in my offence, the entire reason I did the previous PR was because I was using them for SIMD intrinsic fallbacks, and `fabs` is needed for those too, so, I don't really have an excuse. Extra follow-up to rust-lang#146683. r? ``@RalfJung`` who reviewed the previous one These don't appear to be used anywhere outside of the standard locations, at least.
Rollup of 9 pull requests Successful merges: - #146711 (fix 2 borrowck issues) - #146735 (unstably constify float mul_add methods) - #146857 (revert change removing `has_infer` check. Commit conservatively patch…) - #146897 (fix ICE in rustdoc::invalid_html_tags) - #146915 (Make missed precondition-free float intrinsics safe) - #146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones) - #146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions) - #146964 (library: std: sys: pal: uefi: Add some comments) - #146969 (const-eval: better wording for errors involving maybe-null pointers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #146711 (fix 2 borrowck issues) - #146857 (revert change removing `has_infer` check. Commit conservatively patch…) - #146897 (fix ICE in rustdoc::invalid_html_tags) - #146915 (Make missed precondition-free float intrinsics safe) - #146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones) - #146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions) - #146964 (library: std: sys: pal: uefi: Add some comments) - #146969 (const-eval: better wording for errors involving maybe-null pointers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146915 - clarfonthey:safe-intrinsics-2, r=RalfJung Make missed precondition-free float intrinsics safe So, in my defence, these were both separated out from the other intrinsics in the file *and* had a different safety comment in the stable versions, so, I didn't notice them before. But, in my offence, the entire reason I did the previous PR was because I was using them for SIMD intrinsic fallbacks, and `fabs` is needed for those too, so, I don't really have an excuse. Extra follow-up to #146683. r? ```@RalfJung``` who reviewed the previous one These don't appear to be used anywhere outside of the standard locations, at least.
Rollup of 8 pull requests Successful merges: - rust-lang/rust#146711 (fix 2 borrowck issues) - rust-lang/rust#146857 (revert change removing `has_infer` check. Commit conservatively patch…) - rust-lang/rust#146897 (fix ICE in rustdoc::invalid_html_tags) - rust-lang/rust#146915 (Make missed precondition-free float intrinsics safe) - rust-lang/rust#146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones) - rust-lang/rust#146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions) - rust-lang/rust#146964 (library: std: sys: pal: uefi: Add some comments) - rust-lang/rust#146969 (const-eval: better wording for errors involving maybe-null pointers) r? `@ghost` `@rustbot` modify labels: rollup
…alfJung Make missed precondition-free float intrinsics safe So, in my defence, these were both separated out from the other intrinsics in the file *and* had a different safety comment in the stable versions, so, I didn't notice them before. But, in my offence, the entire reason I did the previous PR was because I was using them for SIMD intrinsic fallbacks, and `fabs` is needed for those too, so, I don't really have an excuse. Extra follow-up to rust-lang#146683. r? ```@RalfJung``` who reviewed the previous one These don't appear to be used anywhere outside of the standard locations, at least.
So, in my defence, these were both separated out from the other intrinsics in the file and had a different safety comment in the stable versions, so, I didn't notice them before. But, in my offence, the entire reason I did the previous PR was because I was using them for SIMD intrinsic fallbacks, and
fabsis needed for those too, so, I don't really have an excuse.Extra follow-up to #146683.
r? @RalfJung who reviewed the previous one
These don't appear to be used anywhere outside of the standard locations, at least.