Skip to content

refactor: bump syn to v3 - #1175

Merged
emilio merged 2 commits into
mozilla:mainfrom
AudaciousAxiom:refactor/syn-v3
Jul 26, 2026
Merged

refactor: bump syn to v3#1175
emilio merged 2 commits into
mozilla:mainfrom
AudaciousAxiom:refactor/syn-v3

Conversation

@AudaciousAxiom

Copy link
Copy Markdown
Contributor

Following the recent release of syn v3, this bumps the dependency and makes the necessary refactors, with the goal of reducing dependency duplication in the dependents. The MSRV of syn v3 is now 1.71 but that shouldn't be a problem with cbindgen's MSRV of 1.74.

I've been trough the changelog and didn't find any other relevant breaking changes (but there is quite a few of them so I could have missed some). The biggest change is how receivers and the constness of pointers is now encoded: compare Receiver@v3 with Receiver@v2 and TypePtr@v3 with TypePtr@v2.

I've run cargo test but didn't do any other kind of testing.

Comment thread src/bindgen/ir/function.rs Outdated
if receiver.colon_token.is_some() {
self_ty = Type::load(receiver.ty.as_ref())?.unwrap_or(self_ty);
}
match &receiver.kind {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the part that requires the most attention due to the change around receivers and pointers.

Comment thread Cargo.lock
@AudaciousAxiom
AudaciousAxiom marked this pull request as ready for review July 26, 2026 08:20

@emilio emilio 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.

Thanks for doing this!

Comment thread src/bindgen/ir/function.rs Outdated
Comment thread src/bindgen/ir/function.rs Outdated
Comment thread src/bindgen/ir/function.rs
Comment thread Cargo.lock
Comment thread src/bindgen/ir/function.rs
@emilio
emilio enabled auto-merge July 26, 2026 22:00
@emilio
emilio added this pull request to the merge queue Jul 26, 2026
Merged via the queue into mozilla:main with commit 4acf942 Jul 26, 2026
4 checks passed
@AudaciousAxiom
AudaciousAxiom deleted the refactor/syn-v3 branch July 27, 2026 06:34
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