Skip to content

Update syn from version 2 to version 3#43

Open
tomtau with Copilot wants to merge 1 commit into
masterfrom
copilot/update-to-syn-version-3
Open

Update syn from version 2 to version 3#43
tomtau with Copilot wants to merge 1 commit into
masterfrom
copilot/update-to-syn-version-3

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown

Upgrades the syn dependency in the pest-ast derive crate to version 3.

Changes

  • derive/Cargo.toml: syn version "2""3"
  • derive/src/attributes.rs: Punctuated::pop()pop_pair() (2 call sites)

In syn 3, Punctuated::pop() returns Option<T> directly instead of Option<Pair<T, P>>. The pop_pair() method preserves the previous semantics needed here to destructure both the segment and its trailing punctuation.

Replace `pop().unwrap().into_tuple()` with `pop_pair().unwrap().into_tuple()`
as `Punctuated::pop()` now returns `Option<T>` instead of `Option<Pair<T, P>>`
in syn 3.
Copilot AI requested a review from tomtau July 22, 2026 13:39
@CAD97
CAD97 marked this pull request as ready for review July 22, 2026 14:57
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