-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Add an assert_size attribute for structs #18161
Copy link
Copy link
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
size_ofis 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.