-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-type-systemArea: Type systemArea: Type systemT-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.needs-rfcThis change is large or controversial enough that it should have an RFC accepted before doing it.This change is large or controversial enough that it should have an RFC accepted before doing it.
Description
Currently Option<!>
is 0-sized, but Option<(T, !)>
isn't, despite the fact that the Some
variant of the latter is unconstructable. If this were fixed then you could implement PhantomData
in userland as:
type PhantomData<T> = Option<(T, !)>;
instead of it being special-cased in the compiler.
hellow554, estebank, Aaron1011, WaffleLapkin, elichai and 1 more
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemT-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.needs-rfcThis change is large or controversial enough that it should have an RFC accepted before doing it.This change is large or controversial enough that it should have an RFC accepted before doing it.