Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Java 17 / JDK 17: General Availability. Parent comment
Rust guarantees to optimize the following types T such that Option<T> has the same size as T:
Box<U> &U &mut U fn, extern "C" fn num::NonZero* ptr::NonNull<U> #[repr(transparent)] struct around one of the types in this list.
There are no comments on this comment yet.
Rust guarantees to optimize the following types T such that Option<T> has the same size as T:
UPDATE: Or, better per your example: struct T {i: i32} takes the same size as i32: https://play.rust-lang.org/?version=stable&mode=debug&editio...