-
Notifications
You must be signed in to change notification settings - Fork 155
Implement FromZeroes for Option types? #293
Copy link
Copy link
Closed
Labels
compatibility-nonbreakingChanges that are (likely to be) non-breakingChanges that are (likely to be) non-breakingexperience-hardThis issue is hard, and requires a lot of experienceThis issue is hard, and requires a lot of experiencehelp wantedExtra attention is neededExtra attention is needed
Metadata
Metadata
Assignees
Labels
compatibility-nonbreakingChanges that are (likely to be) non-breakingChanges that are (likely to be) non-breakingexperience-hardThis issue is hard, and requires a lot of experienceThis issue is hard, and requires a lot of experiencehelp wantedExtra attention is neededExtra attention is needed
Type
Fields
Give feedbackNo fields configured for issues without a type.
Some
Optiontypes have known layouts/bit validity (e.g.,Option<&T>whereT: 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 thatNoneis represented as a sequence of zeroes, then it should be sound to implementFromZeroesfor these types.Task:
T, for which we can implementFromZeroes for Option<T>(EDIT: Here's a breadcrumb)I've submitted rust-lang/rust#115333 to clarify the representation of
Options and hopefully unblock more of this issue.