rust/library/core
bors 384b02c082 Auto merge of #120521 - reitermarkus:generic-nonzero-constructors, r=dtolnay
Make `NonZero` constructors generic.

This makes `NonZero` constructors generic, so that `NonZero::new` can be used without turbofish syntax.

Tracking issue: https://github.com/rust-lang/rust/issues/120257

~~I cannot figure out how to make this work with `const` traits. Not sure if I'm using it wrong or whether there's a bug:~~

```rust
101 |         if n == T::ZERO {
    |            ^^^^^^^^^^^^ expected `host`, found `true`
    |
    = note: expected constant `host`
               found constant `true`
```

r? `@dtolnay`
2024-02-08 03:00:34 +00:00
..
benches Auto merge of #85528 - the8472:iter-markers, r=dtolnay 2024-01-21 11:17:46 +00:00
src Auto merge of #120521 - reitermarkus:generic-nonzero-constructors, r=dtolnay 2024-02-08 03:00:34 +00:00
tests Update tests 2024-02-07 10:42:01 +08:00
Cargo.toml Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00