Add an assert_size attribute for structs #18161
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
size_of
is maybe the top use case for function evaluation in static asserts, which doesn't seem like it will happen any time soon. We can satisfy this use case with a very simple and self-contained feature, e.g.I think making this kind of assertion painless will help programs avoid performance regressions.
The text was updated successfully, but these errors were encountered: