Skip to content

Commit

Permalink
Auto merge of #130157 - eduardosm:stabilize-const_float_classify, r=R…
Browse files Browse the repository at this point in the history
…alfJung

Stabilize `const_float_classify`

Tracking issue: rust-lang/rust#72505

Also reverts rust-lang/rust#114486

Closes rust-lang/rust#72505

Stabilized const API:

```rust
impl f32 {
    pub const fn is_nan(self) -> bool;
    pub const fn is_infinite(self) -> bool;
    pub const fn is_finite(self) -> bool;
    pub const fn is_subnormal(self) -> bool;
    pub const fn is_normal(self) -> bool;
    pub const fn classify(self) -> FpCategory;
    pub const fn is_sign_positive(self) -> bool;
    pub const fn is_sign_negative(self) -> bool;
}

impl f64 {
    pub const fn is_nan(self) -> bool;
    pub const fn is_infinite(self) -> bool;
    pub const fn is_finite(self) -> bool;
    pub const fn is_subnormal(self) -> bool;
    pub const fn is_normal(self) -> bool;
    pub const fn classify(self) -> FpCategory;
    pub const fn is_sign_positive(self) -> bool;
    pub const fn is_sign_negative(self) -> bool;
}
```

cc `@rust-lang/wg-const-eval` `@rust-lang/libs-api`
  • Loading branch information
bors committed Oct 4, 2024
2 parents e5be94e + 5ae5a1f commit d03c751
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit d03c751

Please sign in to comment.