Skip to content

Commit 8a4d359

Browse files
alexcrichtonemberian
authored andcommitted
Fix a formatting bug in rusti
1 parent 9423850 commit 8a4d359

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/librusti/program.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl Program {
107107
match *to_print {
108108
Some(ref s) => {
109109
code.push_str(*s);
110-
code.push_char('\n');
110+
code.push_str(";\n");
111111
}
112112
None => {}
113113
}

src/librusti/rusti.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,11 @@ mod tests {
648648
fn f() {}
649649
f()
650650
");
651+
652+
debug!("simultaneous definitions + expressions are allowed");
653+
run_program("
654+
let a = 3; a as u8
655+
");
651656
}
652657

653658
#[test]

0 commit comments

Comments
 (0)