Skip to content

feat: warn on #[derive(Packable)] with sub-optimal packing#21565

Open
nventuro wants to merge 2 commits intomerge-train/fairiesfrom
nico/f-260-warn-on-packable-with-small-types
Open

feat: warn on #[derive(Packable)] with sub-optimal packing#21565
nventuro wants to merge 2 commits intomerge-train/fairiesfrom
nico/f-260-warn-on-packable-with-small-types

Conversation

@nventuro
Copy link
Contributor

Emits a compile-time warning when #[derive(Packable)] is used on structs with 2+ sub-Field members (bools, integers, arrays of these) that could be bit-packed into fewer Fields manually. Uses println as a stopgap since comptime warn doesn't exist yet (noir-lang/noir#7714).

Emits a compile-time warning when `#[derive(Packable)]` is used on structs
with 2+ sub-Field members (bools, integers, arrays of these) that could be
bit-packed into fewer Fields manually. Uses `println` as a stopgap since
comptime `warn` doesn't exist yet (noir-lang/noir#7714).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant