Improved loop bodies

This commit is contained in:
2026-05-22 03:25:05 +02:00
parent a26c1c31fb
commit c5c5e885bf
6 changed files with 51 additions and 21 deletions
+4 -8
View File
@@ -100,14 +100,10 @@ impl GenRust for Expression {
}
}
if let Expression::Statement(stmt) = self {
if !stmt.is_block() && ensure_semicolon {
ctx.expr_ensure_semicolon = true;
cg.add(";");
}
} else {
if ensure_semicolon {
ctx.expr_ensure_semicolon = true;
if ensure_semicolon {
ctx.expr_ensure_semicolon = true;
if !self.is_block() {
cg.add(";");
}
}