diff --git a/src/librusti/program.rs b/src/librusti/program.rs index f17777559de..869b3472422 100644 --- a/src/librusti/program.rs +++ b/src/librusti/program.rs @@ -107,7 +107,7 @@ impl Program { match *to_print { Some(ref s) => { code.push_str(*s); - code.push_char('\n'); + code.push_str(";\n"); } None => {} } diff --git a/src/librusti/rusti.rs b/src/librusti/rusti.rs index 57a2a48a0f6..54a404d971e 100644 --- a/src/librusti/rusti.rs +++ b/src/librusti/rusti.rs @@ -648,6 +648,11 @@ mod tests { fn f() {} f() "); + + debug!("simultaneous definitions + expressions are allowed"); + run_program(" + let a = 3; a as u8 + "); } #[test]