diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-24 11:08:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-24 11:08:20 +0100 |
| commit | 220251e1816c31bda083d2d5a9a0238bc489a837 (patch) | |
| tree | f59eed092701d6a58a7452054868947052d6fe76 /library/std/src | |
| parent | 5d1c99275d479df7e288bc2eb08826ea9ee10614 (diff) | |
| parent | 6f7dc380310acdb6cc6de922b93619b6c16018d7 (diff) | |
| download | rust-220251e1816c31bda083d2d5a9a0238bc489a837.tar.gz rust-220251e1816c31bda083d2d5a9a0238bc489a837.zip | |
Rollup merge of #133389 - eduardosm:stabilize-const_float_methods, r=RalfJung
Stabilize `const_float_methods`
Tracking issue: https://github.com/rust-lang/rust/issues/130843
Relnotes: #133383
Stabilized const API:
```rust
// in `core`
impl f32/f64 {
pub const fn recip(self) -> Self;
pub const fn to_degrees(self) -> Self;
pub const fn to_radians(self) -> Self;
pub const fn max(self, other: Self) -> Self;
pub const fn min(self, other: Self) -> Self;
pub const fn clamp(self, min: Self, max: Self) -> Self;
pub const fn abs(self) -> Self;
pub const fn signum(self) -> Self;
pub const fn copysign(self, sign: Self) -> Self;
}
```
Closes https://github.com/rust-lang/rust/issues/130843
r? libs-api
cc `@RalfJung` -- I think the way const-stability attributes work have change a bit since the last time a wrote a const-stabilization PR, please make sure I got them right.
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/lib.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 9c4e6f296fe..b6723c6dfa5 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -288,7 +288,6 @@ #![feature(cfg_target_thread_local)] #![feature(cfi_encoding)] #![feature(concat_idents)] -#![feature(const_float_methods)] #![feature(decl_macro)] #![feature(deprecated_suggestion)] #![feature(doc_cfg)] |
