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
The main usage of this would be for generics. It would allow "disabling" of certain parts of a generic type, for example a generic filesystem that has a Dir parameter could have that set to noreturn to represent a filesystem that did not include opening directories.
It would be a zero bit type because it only has one possible value, null.
Interestingly noreturn already works properly with error unions, with @sizeOf(anyerror) being equal to @sizeOf(anyerror!noreturn).
The text was updated successfully, but these errors were encountered:
The main usage of this would be for generics. It would allow "disabling" of certain parts of a generic type, for example a generic filesystem that has a
Dir
parameter could have that set tonoreturn
to represent a filesystem that did not include opening directories.It would be a zero bit type because it only has one possible value,
null
.Interestingly
noreturn
already works properly with error unions, with@sizeOf(anyerror)
being equal to@sizeOf(anyerror!noreturn)
.The text was updated successfully, but these errors were encountered: