rust/library/core/src/num
Matthias Krüger ffc0b8a545
Rollup merge of #106633 - c410-f3r:stabilize-nonzero_bits, r=dtolnay
Stabilize `nonzero_min_max`

## Overall

Stabilizes `nonzero_min_max` to allow the "infallible" construction of ordinary minimum and maximum `NonZero*` instances.

The feature is fairly straightforward and already matured for some time in stable toolchains.

```rust
let _ = NonZeroU8::MIN;
let _ = NonZeroI32::MAX;
```

## History

* On 2022-01-25, implementation was [created](https://github.com/rust-lang/rust/pull/93293).

## Considerations

* This report is fruit of the inanition observed after two unsuccessful attempts at getting feedback.
* Other constant variants discussed at https://github.com/rust-lang/rust/issues/89065#issuecomment-923238190 are orthogonal to this feature.

Fixes https://github.com/rust-lang/rust/issues/89065
2023-03-11 15:43:12 +01:00
..
dec2flt Remove a couple of #[doc(hidden)] pub fn and their #[feature] gates 2023-02-10 08:06:35 +01:00
flt2dec Fix inconsistent rounding of 0.5 when formatted to 0 decimal places 2022-10-11 23:09:23 +02:00
shells reword descriptions of the deprecated int modules 2023-02-03 16:50:49 -07:00
bignum.rs Rename integer log* methods to ilog* 2022-08-09 10:20:49 -07:00
diy_float.rs Fix assert in diy_float 2021-07-27 16:02:35 -04:00
error.rs Remove a couple of #[doc(hidden)] pub fn and their #[feature] gates 2023-02-10 08:06:35 +01:00
f32.rs Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
f64.rs Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
fmt.rs Fix a bunch of typos 2021-12-14 16:40:43 +01:00
int_log10.rs Have a function for the log(0) panic, rather than copy-pasting the string constant 2023-02-10 12:50:17 -08:00
int_macros.rs Require literals for some (u)int_impl! parameters 2023-02-22 23:26:22 -08:00
mod.rs Use named arguments for int_impl macro 2023-02-20 18:18:49 +00:00
nonzero.rs Remove unstable feature 2023-01-09 10:01:38 -03:00
saturating.rs Unimpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}<$t> for Saturating<$t> 2022-01-26 23:49:54 +01:00
uint_macros.rs Require literals for some (u)int_impl! parameters 2023-02-22 23:26:22 -08:00
wrapping.rs Stabilize wrapping_int_assign_impl in 1.60.0. 2022-02-07 11:45:12 +01:00