google/zerocopy

Accepted risk: `Immutable` types assumed not to contain `UnsafeCell`s

joshlf opened this issue · 0 comments

As part of #1155, we need guarantees that certain standard library types such as Box and NonZeroXxx and even built-ins such as usize do not contain UnsafeCells. Per rust-lang/unsafe-code-guidelines#492, it is difficult to get this guarantee, but it's also incredibly obvious that it's true and would be absurd to change (and certainly absurd in a way that doesn't just result in these types containing UnsafeCells, but in a way that permits interior mutation to be exercised, which is really what Immutable cares about).

This issue tracks that this is an accepted risk, and we're going to proceed with 0.8 anyway.