Skip to content

Commit 8afb6a8

Browse files
committed
Auto merge of rust-lang#153975 - cyrgani:remove-f64-methods, r=scottmcm
remove forever-deprecated and hidden `f64` methods The methods `f64::is_positive` and `f64::is_negative` were deprecated since 1.0 and marked as `#[doc(hidden)]` in favor of `f64::is_sign_positive` and `f64::is_sign_negative`. They also only exist on `f64`, not on `f32`. But for some unknown reason, they have been marked as stable. This PR proposes to remove both methods as they were never a part of the documented API, assuming that a crater run finds no significant breakage.
2 parents 4b0c9d7 + e01e82a commit 8afb6a8

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

library/core/src/num/f64.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -819,15 +819,6 @@ impl f64 {
819819
!self.is_sign_negative()
820820
}
821821

822-
#[must_use]
823-
#[stable(feature = "rust1", since = "1.0.0")]
824-
#[deprecated(since = "1.0.0", note = "renamed to is_sign_positive")]
825-
#[inline]
826-
#[doc(hidden)]
827-
pub fn is_positive(self) -> bool {
828-
self.is_sign_positive()
829-
}
830-
831822
/// Returns `true` if `self` has a negative sign, including `-0.0`, NaNs with
832823
/// negative sign bit and negative infinity.
833824
///
@@ -855,15 +846,6 @@ impl f64 {
855846
self.to_bits() & Self::SIGN_MASK != 0
856847
}
857848

858-
#[must_use]
859-
#[stable(feature = "rust1", since = "1.0.0")]
860-
#[deprecated(since = "1.0.0", note = "renamed to is_sign_negative")]
861-
#[inline]
862-
#[doc(hidden)]
863-
pub fn is_negative(self) -> bool {
864-
self.is_sign_negative()
865-
}
866-
867849
/// Returns the least number greater than `self`.
868850
///
869851
/// Let `TINY` be the smallest representable positive `f64`. Then,

0 commit comments

Comments
 (0)