Skip to content

Fix jsg-macros build after the #8201 and #8213 merges - #8233

Merged
bartlomieju merged 1 commit into
mainfrom
biwanczuk/fix-jsg-macros-rest-param-build
Nov 5, 2026
Merged

bartlomieju merged 1 commit into
mainfrom
biwanczuk/fix-jsg-macros-rest-param-build

Conversation

@bartlomieju

Copy link
Copy Markdown
Collaborator

main is broken at 8c82573: every bazel job fails compiling //src/rust/jsg-macros:

error[E0277]: the trait bound `Result<TokenStream, TokenStream>: From<TokenStream>` is not satisfied
   --> src/rust/jsg-macros/lib.rs:459:58

#8201 made generate_callbacks return Result<TokenStream, TokenStream>, and #8213, written against the old signature, added a rest-parameter check that returned reject(...).into(). The two merged without a textual conflict but no longer compile. This returns the rejection as Err, like the function's other early exits.

Tested: //src/rust/jsg-macros:jsg-macros_test and //src/rust/jsg-test:jsg-test_test pass.

#8201 made generate_callbacks return Result<TokenStream, TokenStream>,
and #8213, written against the old signature, added a rest-parameter
check that returned reject(...).into(). The two merged without a textual
conflict but no longer compile. Return the rejection as Err, like the
function's other early exits.
@bartlomieju
bartlomieju requested review from a team as code owners November 5, 2026 11:09

@clanky-the-clanker clanky-the-clanker Bot 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.

✅ Approved — The one-line change fixes the type mismatch and is consistent with the function's other early exits. No issues found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

generate_callbacks returns Result<TokenStream, TokenStream>, and input_fn is already a &ItemFn. Err(reject(input_fn, ...)) therefore type-checks and matches the earlier receiver and this error exits. The .into() call at line 1075 is in a different function that returns a proc_macro::TokenStream, so it still compiles.


Reviewed commit: 16d0c4e2

@bartlomieju
bartlomieju enabled auto-merge (squash) November 5, 2026 11:58
@bartlomieju
bartlomieju merged commit 348bcf4 into main Nov 5, 2026
36 of 39 checks passed
@bartlomieju
bartlomieju deleted the biwanczuk/fix-jsg-macros-rest-param-build branch November 5, 2026 12:19
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