On Mon, Aug 17, 2026 at 11:36 PM Burak Emir <[email protected]> wrote: > > To add a minor point to this, if rustc could figure out that a > suitable non-zero number literal can be treated as NonZero<usize>, > we'd not need a macro and it would all be very ergonomic...
Yeah, that and/or `1nz` literals could be nice. It may be a bit niche, though; and we would like good ergonomics for our own custom types too. Nevertheless, I will ask upstream Rust in our next meeting about https://github.com/rust-lang/rust/issues/69329. I added it to https://github.com/Rust-for-Linux/linux/issues/354 as well. Cheers, Miguel
