Skip to content

codegen: Resolve function typedefs in block pointers - #3501

Merged
emilio merged 1 commit into
rust-lang:mainfrom
lwz23:fix/block-function-typedef
Sep 23, 2026
Merged

emilio merged 1 commit into
rust-lang:mainfrom
lwz23:fix/block-function-typedef

Conversation

@lwz23

@lwz23 lwz23 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3487.

Resolve type aliases as well as type references when code-generating a block pointer's function signature. A block declared as typedef F (^Blk) now reaches the underlying function type instead of panicking on the F alias. The new fixture compares that form with a direct block declaration and checks that both produce the same typed Block<(c_int,), ()> pointer.

The resolver already detects alias cycles; this change uses that existing path.

@emilio
emilio added this pull request to the merge queue Sep 23, 2026
Merged via the queue into rust-lang:main with commit f8160de Sep 23, 2026
52 checks passed
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.

--generate-block panics on typedef F (^Blk) when F is a function typedef

2 participants