Skip to content

Bump syn from 2.0.118 to 3.0.3 in /autorust - #818

Open
John Batty (johnbatty) wants to merge 2 commits into
microsoft:mainfrom
johnbatty:dependabot/cargo/autorust/syn-3.0.3-2
Open

Bump syn from 2.0.118 to 3.0.3 in /autorust#818
John Batty (johnbatty) wants to merge 2 commits into
microsoft:mainfrom
johnbatty:dependabot/cargo/autorust/syn-3.0.3-2

Conversation

@johnbatty

Copy link
Copy Markdown
Collaborator

Bumps syn from 2.0.118 to 3.0.3 in autorust/codegen.

This supersedes #813: the plain dependabot bump does not compile, because syn 3.0 is a major release with breaking changes to the AST types that autorust/codegen uses directly. This PR includes the version bump plus the source migration needed to build.

syn 3.0 API migration (autorust/codegen/src/codegen.rs)

  • TraitBoundModifier enum replaced by the new TraitBoundModifiers struct; TraitBound.modifier split into modifiers plus a separate maybe: Option<Token![?]> field.
  • attrs is now a mandatory field on every Type variant — added to the TypeReference, TypeImplTrait, and TypePath literals.
  • The From<...> for Type impls were removed — replaced Type::from(...) with the explicit Type::Path(...) / Type::Reference(...) variants.

Verification

  • cargo build --release (autorust) — passes
  • ./build.sh (patch → generate → compile crate) — passes
  • Regenerated azure_devops_rust_api/src output is byte-identical to the committed source (the upgrade changes nothing about generated code)
  • cargo clippy --all-features -- --deny warnings — clean
  • cargo clippy --all-features --examples -- --deny warnings — clean
  • cargo test -p autorust_codegen --lib — 73 passed

Note: syn is a build-time-only dependency of the code generator and is not part of the published azure_devops_rust_api crate's dependency tree.

🤖 Generated with Claude Code

dependabot Bot and others added 2 commits August 6, 2026 11:23
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.118 to 3.0.3.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](dtolnay/syn@2.0.118...3.0.3)

---
updated-dependencies:
- dependency-name: syn
  dependency-version: 3.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Adapt codegen.rs to syn 3.0 breaking changes so the generator compiles
with syn 3: TraitBoundModifier enum replaced by TraitBoundModifiers
struct plus a separate `maybe` field, mandatory `attrs` on Type variants,
and removal of the From<...> for Type impls (use explicit variants).

Generated crate output is byte-identical.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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