You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some Option types have known layouts/bit validity (e.g., Option<&T> where T: Sized). Are these actually guaranteed, or just "in practice everyone knows that's how the compiler does it"? If it's the former, and we know that None is represented as a sequence of zeroes, then it should be sound to implement FromZeroes for these types.
Task:
Find types, T, for which we can implement FromZeroes for Option<T> (EDIT: Here's a breadcrumb)
For each such type, ensure that we can make a bulletproof soundness argument based on the Rust reference and the standard library documentation
Put up a PR to emit the appropriate impl.
I've submitted rust-lang/rust#115333 to clarify the representation of Options and hopefully unblock more of this issue.
Activity
Auto merge of rust-lang#115333 - joshlf:patch-5, r=RalfJung
FromZeroes for Option<T> where T is subject to NPO
FromZeroes for Option<T> where T is subject to NPO (#595)
Auto merge of #115333 - joshlf:patch-5, r=RalfJung
Auto merge of #115333 - joshlf:patch-5, r=RalfJung
Auto merge of #115333 - joshlf:patch-5, r=RalfJung
Auto merge of #115333 - joshlf:patch-5, r=RalfJung