3 ms·
It's an interesting suggestion to impose Option semantics on raw pointers by default (presumably with some alternative way to receive a nullable pointer, for co
by kibwen 4y ago
It's an interesting suggestion to impose Option semantics on raw pointers by default (presumably with some alternative way to receive a nullable pointer, for completeness). But in the meantime, in your own codebase, it's easy enough to do `type Ptr<T> = Option<NonNull<<T>>`.
- josephg 4y agoThe problem there is that NonNull is exclusively a wrapper around *mut T. Using it discards the distinction with *const _ pointers. I think that has implications for correctness with Miri.