Skip to content

test(semantic): pin the rejection of an expansion zipping sibling repetitions - #10316

Merged
orizi merged 1 commit into
mainfrom
graph-plan/2026-08-03-macro-fixes/pin-sibling-zip-rejection
Aug 13, 2026
Merged

orizi merged 1 commit into
mainfrom
graph-plan/2026-08-03-macro-fixes/pin-sibling-zip-rejection

Conversation

@orizi

@orizi orizi commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

An expansion block whose placeholders come from two sibling pattern
repetitions is rejected at declaration time (E2199). rustc accepts the
declaration and zips equal-length repetitions at expansion; staying
stricter is a deliberate decision (2026-08-04) - the shape is confusing
and the declaration-time error is actionable.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

orizi commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@orizi
orizi force-pushed the graph-plan/2026-08-03-macro-fixes/expansion-plus-requires-group branch from 94fdd8f to 11ce2dc Compare August 4, 2026 08:41
@orizi
orizi force-pushed the graph-plan/2026-08-03-macro-fixes/pin-sibling-zip-rejection branch from d3940c4 to 455fe4a Compare August 4, 2026 08:41
@orizi
orizi force-pushed the graph-plan/2026-08-03-macro-fixes/expansion-plus-requires-group branch from 11ce2dc to f874dc3 Compare August 4, 2026 08:56
@orizi
orizi force-pushed the graph-plan/2026-08-03-macro-fixes/pin-sibling-zip-rejection branch from 455fe4a to 6c9be73 Compare August 4, 2026 08:56
@orizi
orizi changed the base branch from graph-plan/2026-08-03-macro-fixes/expansion-plus-requires-group to graphite-base/10316 August 5, 2026 10:54
@orizi
orizi marked this pull request as ready for review August 5, 2026 11:10
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only change; no compiler logic modified.

Overview
Adds a snapshot test in inline_macros that locks in Cairo’s behavior when a macro expansion block mixes placeholders from two sibling pattern repetitions (e.g. $($a:ident),* ; $($b:ident),* with body $($a + $b + )*).

The test expects E2199 at macro declaration time (Macro placeholder 'b' is from a different repetition than the one driving this expansion block), documenting that this shape is intentionally rejected even though rustc would accept the rule and zip equal-length repetitions at expansion.

Reviewed by Cursor Bugbot for commit d2fb92b. Bugbot is set up for automated code reviews on this repo. Configure here.

@orizi
orizi force-pushed the graphite-base/10316 branch from f874dc3 to 846bfe2 Compare August 5, 2026 15:15
@orizi
orizi force-pushed the graph-plan/2026-08-03-macro-fixes/pin-sibling-zip-rejection branch from 6c9be73 to 2c6e68c Compare August 5, 2026 15:15
@orizi
orizi changed the base branch from graphite-base/10316 to graph-plan/2026-08-03-macro-fixes/expansion-plus-requires-group August 5, 2026 15:16
@orizi
orizi force-pushed the graph-plan/2026-08-03-macro-fixes/expansion-plus-requires-group branch from 846bfe2 to f1c1c1a Compare August 6, 2026 11:33
@orizi
orizi force-pushed the graph-plan/2026-08-03-macro-fixes/pin-sibling-zip-rejection branch from 2c6e68c to 49a6210 Compare August 6, 2026 11:33
@orizi
orizi changed the base branch from graph-plan/2026-08-03-macro-fixes/expansion-plus-requires-group to graphite-base/10316 August 6, 2026 11:39
…etitions

An expansion block whose placeholders come from two sibling pattern
repetitions is rejected at declaration time (E2199). rustc accepts the
declaration and zips equal-length repetitions at expansion; staying
stricter is a deliberate decision (2026-08-04) - the shape is confusing
and the declaration-time error is actionable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@orizi
orizi force-pushed the graph-plan/2026-08-03-macro-fixes/pin-sibling-zip-rejection branch from 49a6210 to d2fb92b Compare August 12, 2026 20:57
@orizi
orizi force-pushed the graphite-base/10316 branch from f1c1c1a to 2cd7a83 Compare August 12, 2026 20:57
@orizi
orizi changed the base branch from graphite-base/10316 to main August 12, 2026 20:57

@TomerStarkware TomerStarkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@TomerStarkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on eytan-starkware).

@orizi
orizi added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit c5eac41 Aug 13, 2026
106 checks passed
@orizi
orizi deleted the graph-plan/2026-08-03-macro-fixes/pin-sibling-zip-rejection branch August 19, 2026 14:37
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.

3 participants