Skip to content

refactor: align initializers and matches with declaration order - #213

Merged
cruskell merged 1 commit into
mainfrom
codex/align-initializers-and-matches
Oct 18, 2026
Merged

cruskell merged 1 commit into
mainfrom
codex/align-initializers-and-matches

Conversation

@cruskell

Copy link
Copy Markdown
Owner

Struct literals and enum matches still used older member orders after the declaration cleanup. Align their fields and arms with the declarations across the parser, shared data types, preprocessor, driver, and all three backends. Also align enum alternatives in patterns and matches!.

Precompute dependent values before moving their owners, and preserve parser-state updates and VLA scope snapshots when constructing nodes. Keep the relative order of overlapping patterns, guarded cases, and wildcard fallbacks.

Validation:

  • cargo +1.86.0 fmt --check
  • RUSTUP_TOOLCHAIN=1.86.0 make lint (all targets/features; warnings denied)
  • cargo +1.86.0 test --all-features with Clang 15: 51 unit tests, 2,101 integration tests, and 1 doc test passed; 2 optional integration tests ignored.
  • Temporary syntax comparison confirmed that changes outside the 8 manually reviewed functions consist of field/arm/alternative reordering. Comment text is preserved.
  • macOS and AArch64 execution were not available locally.

@cruskell
cruskell merged commit 13ff7ac into main Oct 18, 2026
1 check passed
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.

1 participant