Void is surprisingly useful.
Void is surprisingly useful.
Posted Sep 10, 2026 0:19 UTC (Thu) by NYKevin (subscriber, #129325)In reply to: Void is surprisingly useful. by alx.manpages
Parent article: Stabilizing Rust's never type
An "optional type parameter" is a type parameter that you can leave out at the callsite. In your example, that would mean an API that lets you write malloc_T(37, void) or some other syntax instead of "void", such as malloc_T(37). But you can't do that with your example, because sizeof(void) is nonsense. So your example has a mandatory type parameter, not an optional type parameter.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
