Skip to content

transpile: Swap cast and negation for integer literals#1686

Merged
kkysen merged 4 commits intoimmunant:masterfrom
Rua:negate
Mar 31, 2026
Merged

transpile: Swap cast and negation for integer literals#1686
kkysen merged 4 commits intoimmunant:masterfrom
Rua:negate

Conversation

@Rua
Copy link
Copy Markdown
Contributor

@Rua Rua commented Mar 24, 2026

The issue was closed long ago because it was deemed to be not worth the effort. I decided to make the effort anyway because it looks nicer. :)

Comment thread c2rust-transpile/src/translator/operators.rs
Comment thread c2rust-transpile/src/translator/literals.rs Outdated
Comment thread c2rust-transpile/src/translator/operators.rs
Comment thread c2rust-transpile/src/translator/operators.rs Outdated
@kkysen kkysen merged commit c04a7f6 into immunant:master Mar 31, 2026
11 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.

Feature request: Don't wrap the numeric part of negative literals in parentheses

2 participants