Skip to content

Conversation

@Rua
Copy link
Contributor

@Rua Rua commented Dec 6, 2025

@Rua Rua marked this pull request as draft December 6, 2025 19:00
@Rua
Copy link
Contributor Author

Rua commented Dec 7, 2025

I ran into an unexpected snag with this one: the stmts_block helper function is adding back the semicolon if it's missing. Ideally I would just remove that behaviour, but that has the obvious potential to break a lot of things, so does anyone know why it's there and what other things rely on it?

Copy link
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

It seems this is passing c2rust-testsuite CI even though there are many errors, so something went wrong there. Ugh.

@Rua Rua force-pushed the return-tail-expr branch 5 times, most recently from 8c78800 to 5cabdd8 Compare December 10, 2025 18:20
@Rua Rua force-pushed the return-tail-expr branch from 5cabdd8 to 80842e4 Compare December 10, 2025 18:31
@Rua Rua force-pushed the return-tail-expr branch from 80842e4 to d50212e Compare December 10, 2025 18:40
@Rua Rua marked this pull request as ready for review December 10, 2025 19:05
@Rua
Copy link
Contributor Author

Rua commented Dec 10, 2025

I was able to remove the semicolon-adding code from stmts_block without any adverse effects in the tests, so let's hope it wasn't needed anywhere else. I think this is ready for review now.

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.

transpile: return is stripped from end of statement expressions transpile: return is emitted in final statement

2 participants