rust-analyzer / rowan

Apache License 2.0
677 stars 57 forks source link

Niching for Checkpoint #160

Closed mattfbacon closed 5 months ago

mattfbacon commented 6 months ago

Since Checkpoint is a fairly arbitrary integer newtype, it would be nice to use the NonZero* variant of the internal integer type to allow niching. I think it would be fairly simple to do: just add one when wrapping the type and subtract one when unwrapping it.