Skip to content

Update workspace dependencies - #3433

Open
tagawa0525 wants to merge 2 commits into
rust-lang:mainfrom
tagawa0525:update-dependencies
Open

Update workspace dependencies#3433
tagawa0525 wants to merge 2 commits into
rust-lang:mainfrom
tagawa0525:update-dependencies

Conversation

@tagawa0525

Copy link
Copy Markdown

Summary

Pin all workspace dependencies to their latest versions and adapt the code where APIs changed.

Changes

  • annotate-snippets 0.11 → 0.12: port diagnostics.rs to the new Group/Element API. Level enum variants became consts with a lifetime parameter, Snippet::origin() became path(), and title/footer composition now goes through Group. Snippets set fold(false) to keep showing unannotated source lines as before. Verified the rendered output of --experimental --emit-diagnostics (invalid-regex warning) still displays correctly.
  • libloading 0.8 → 0.9: no code changes needed. The dyngen template already passes &OsStr to Library::new (5813198 / feat(dyngen): preconvert path to OsStr when opening the library #3315), which satisfies libloading 0.9's AsFilename bound. The generated dynamic_loading_* expectations compile against 0.9 unchanged.
  • quickcheck 1.1: QuickCheck::gen is deprecated (gen is a Rust 2024 keyword) → use QuickCheck::rng.
  • Remaining updates (env_logger 0.11, similar 3, clap 4.6, etc.) needed no code changes; a follow-up commit fixes the clippy warnings surfaced by the updates (implicit_clone in diagnostics.rs, doc_markdown in regex_set.rs).

Test

cargo test results are unchanged from the unmodified tree: the two expectation tests failing locally (issue-544-stylo-creduce-2, nsbasehashtable) also fail on clean main with libclang 21 and are unrelated to this change.

tagawa0525 and others added 2 commits August 14, 2026 01:18
Pin all workspace dependencies to their latest versions, notably:

- annotate-snippets 0.11 -> 0.12: port diagnostics.rs to the new
  Group/Element API (Level enum variants became consts with a
  lifetime parameter, Snippet::origin() became path(), title/footer
  composition now goes through Group). Snippets set fold(false) to
  keep showing unannotated source lines as before.
- libloading 0.8 -> 0.9: no code changes needed; the dyngen
  template already passes &OsStr to Library::new (5813198), which
  satisfies libloading 0.9's AsFilename bound. The generated
  dynamic_loading_* expectations compile against 0.9 unchanged.
- env_logger 0.10 -> 0.11, similar 2 -> 3: no code changes needed.

cargo test results are unchanged from before this commit: the two
failing expectation tests (issue-544-stylo-creduce-2, nsbasehashtable)
also fail on the unmodified tree with libclang 21 and are unrelated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TwjQ7wD6uxpJMX6jzPRj9K
- diagnostics.rs: annotate-snippets 0.12's render() returns String
  directly, so the to_string() call became an implicit clone
  (clippy::implicit_clone); iterate over the String's lines directly.
- quickchecking: quickcheck 1.1 deprecated QuickCheck::gen in favor
  of QuickCheck::rng.
- regex_set.rs: add missing backticks in a doc comment
  (clippy::doc_markdown).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TwjQ7wD6uxpJMX6jzPRj9K
Copilot AI lite review requested due to automatic review settings August 15, 2026 05:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the workspace’s pinned dependency versions and adjusts bindgen’s code to accommodate upstream API changes (notably annotate-snippets and quickcheck), keeping diagnostic output and tests functioning under the new dependency set.

Changes:

  • Bump and re-pin [workspace.dependencies] to newer crate versions and refresh Cargo.lock accordingly.
  • Port the diagnostics rendering pipeline to annotate-snippets 0.12’s Group/Snippet API and update Level usages to the new const-based API.
  • Update the quickcheck-based test harness to use QuickCheck::rng (replacing deprecated QuickCheck::gen).

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Cargo.toml Updates workspace dependency pins to newer versions.
Cargo.lock Refreshes the resolved dependency graph/checksums after version bumps.
bindgen/regex_set.rs Updates doc comment formatting and Level::* usages for diagnostics.
bindgen/lib.rs Updates diagnostic emission to use the new Level::* consts.
bindgen/ir/var.rs Updates diagnostic Level usage to the new API.
bindgen/ir/context.rs Updates diagnostic Level usage to the new API.
bindgen/diagnostics.rs Ports diagnostics rendering to annotate-snippets 0.12 Group/Snippet API.
bindgen/codegen/mod.rs Updates diagnostic Level usage to the new API.
bindgen-tests/tests/quickchecking/src/lib.rs Switches from deprecated QuickCheck::gen to QuickCheck::rng.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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