Skip to content

Commit

Permalink
Auto merge of rust-lang#124828 - tspiteri:feature-f16-not-f128, r=Nil…
Browse files Browse the repository at this point in the history
…strieb

f16::is_sign_{positive,negative} were feature-gated on f128

`f16::is_sign_positive` and `f16::is_sign_negative` were feature-gated on `"f128"` instead of `"f16"`.
  • Loading branch information
bors committed May 7, 2024
2 parents 60a7c19 + fac0a74 commit 14081a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/num/f16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl f16 {
/// See [explanation of NaN as a special value](f32) for more info.
#[inline]
#[must_use]
#[unstable(feature = "f128", issue = "116909")]
#[unstable(feature = "f16", issue = "116909")]
pub fn is_sign_positive(self) -> bool {
!self.is_sign_negative()
}
Expand All @@ -239,7 +239,7 @@ impl f16 {
/// See [explanation of NaN as a special value](f32) for more info.
#[inline]
#[must_use]
#[unstable(feature = "f128", issue = "116909")]
#[unstable(feature = "f16", issue = "116909")]
pub fn is_sign_negative(self) -> bool {
// IEEE754 says: isSignMinus(x) is true if and only if x has negative sign. isSignMinus
// applies to zeros and NaNs as well.
Expand Down

0 comments on commit 14081a2

Please sign in to comment.