Guarantee behavior of transmuting `Option::<T>::None` subject to NPO In https://github.com/rust-lang/rust/pull/115333, we added a guarantee that transmuting from `[0u8; N]` to `Option<P>` is sound where `P` is a pointer type subject to the null pointer optimization (NPO). It would be useful to be able to guarantee the inverse - that a `None::<P>` value can be transmutes to an array and that will yield `[0u8; N]`. Closes #117591 |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||