mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-27 18:56:24 +00:00
![]() 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` |
||
---|---|---|
.. | ||
alloc | ||
backtrace@6145fe6bac | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@5ef6eb42bd | ||
sysroot | ||
test | ||
unwind |