Skip to content

Hoist const variables from goto_block#182

Merged
nunoplopes merged 1 commit into
Cpp2Rust:masterfrom
lucic71:hoist-const
Jun 5, 2026
Merged

Hoist const variables from goto_block#182
nunoplopes merged 1 commit into
Cpp2Rust:masterfrom
lucic71:hoist-const

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented Jun 4, 2026

No description provided.

@lucic71
Copy link
Copy Markdown
Contributor Author

lucic71 commented Jun 4, 2026

Hmm, maybe a better strategy is to not translated the hoiste const variable as mut, and instead translate it as const.

@nunoplopes
Copy link
Copy Markdown
Contributor

A variable might be const but still have a non-const initializer, so this is the best we can do for the general case.

@nunoplopes nunoplopes merged commit 041c01f into Cpp2Rust:master Jun 5, 2026
9 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.

2 participants