Skip to content

Conversation

@tarcieri
Copy link
Member

  • Allows omitting the 16 in 16 | 32
  • Adds 16 vs 32 | 64 as an option, where 64 can be omitted

- Allows omitting the `16` in `16 | 32`
- Adds `16` vs `32 | 64` as an option, where `64` can be omitted
@tarcieri tarcieri merged commit e13fd9e into master Jan 18, 2026
120 checks passed
@tarcieri tarcieri deleted the cpubits/shorthand-and-more-combos branch January 18, 2026 20:21
tarcieri added a commit that referenced this pull request Jan 19, 2026
In #1398 I experimented with making some of the syntax implicit, but as
soon as it became clear I also needed to add support for ignoring
certain bit sizes and only running code on others that quickly became a
bad idea.

This commit changes the syntax to be fully explicit, like a `match`
expression that takes an implicit argument of the number of bits with no
other weird rules. If you want the block to appear in the code on e.g.
16-bit targets, they need to be explicitly named.

This commit implements all permutations except for `16 | 32 | 64` since
that amounts to no gating whatsoever, which defeats the point of using
this crate.
tarcieri added a commit that referenced this pull request Jan 19, 2026
In #1398 I experimented with making some of the syntax implicit, but as
soon as it became clear I also needed to add support for ignoring
certain bit sizes and only running code on others that quickly became a
bad idea.

This commit changes the syntax to be fully explicit, like a `match`
expression that takes an implicit argument of the number of bits with no
other weird rules. If you want the block to appear in the code on e.g.
16-bit targets, they need to be explicitly named.

This commit implements all permutations except for `16 | 32 | 64` since
that amounts to no gating whatsoever, which defeats the point of using
this crate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants