Skip to content

Commit

Permalink
Auto merge of rust-lang#84086 - m-ou-se:stabilze-is-subnormal, r=dtolnay
Browse files Browse the repository at this point in the history
Stabilize is_subnormal.

FCP completed here: rust-lang#79288 (comment)
  • Loading branch information
bors committed Apr 13, 2021
2 parents 7ce470f + 1a62bdb commit 23aef90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ impl f32 {
/// Returns `true` if the number is [subnormal].
///
/// ```
/// #![feature(is_subnormal)]
/// let min = f32::MIN_POSITIVE; // 1.17549435e-38f32
/// let max = f32::MAX;
/// let lower_than_min = 1.0e-40_f32;
Expand All @@ -516,7 +515,7 @@ impl f32 {
/// assert!(lower_than_min.is_subnormal());
/// ```
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
#[unstable(feature = "is_subnormal", issue = "79288")]
#[stable(feature = "is_subnormal", since = "1.53.0")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
#[inline]
pub const fn is_subnormal(self) -> bool {
Expand Down
3 changes: 1 addition & 2 deletions library/core/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ impl f64 {
/// Returns `true` if the number is [subnormal].
///
/// ```
/// #![feature(is_subnormal)]
/// let min = f64::MIN_POSITIVE; // 2.2250738585072014e-308_f64
/// let max = f64::MAX;
/// let lower_than_min = 1.0e-308_f64;
Expand All @@ -515,7 +514,7 @@ impl f64 {
/// assert!(lower_than_min.is_subnormal());
/// ```
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
#[unstable(feature = "is_subnormal", issue = "79288")]
#[stable(feature = "is_subnormal", since = "1.53.0")]
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
#[inline]
pub const fn is_subnormal(self) -> bool {
Expand Down

0 comments on commit 23aef90

Please sign in to comment.