about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-05-13 18:22:18 -0400
committerAlex Crichton <alex@alexcrichton.com>2013-05-14 14:11:07 -0400
commit4a9d8ff1a7ee6e832cceb582cb213ac6444f09b6 (patch)
tree8033b9006cb2a1121939d392f0b4fa05bc0a2837
parent54f2147e8eb49507e419b2129a08bfd1585f7e77 (diff)
downloadrust-4a9d8ff1a7ee6e832cceb582cb213ac6444f09b6.tar.gz
rust-4a9d8ff1a7ee6e832cceb582cb213ac6444f09b6.zip
Fix `use` statements with rusti
-rw-r--r--src/librusti/rusti.rc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librusti/rusti.rc b/src/librusti/rusti.rc
index 65cd50e4b7f..1b60966005c 100644
--- a/src/librusti/rusti.rc
+++ b/src/librusti/rusti.rc
@@ -122,7 +122,7 @@ fn run(repl: Repl, input: ~str) -> Repl {
 
     debug!("building driver input");
     let head = include_str!("wrapper.rs").to_owned();
-    let foot = fmt!("%s\nfn main() {\n%s\n\nprint({\n%s\n})\n}",
+    let foot = fmt!("fn main() {\n%s\n%s\n\nprint({\n%s\n})\n}",
                     repl.view_items, repl.stmts, input);
     let wrapped = driver::str_input(head + foot);
 
@@ -444,6 +444,7 @@ mod tests {
     }
 
     fn use_does_not_crash() {
+        // Regression tests for #5937
         let mut r = repl();
         let result = run_line(&mut r, io::stdin(), io::stdout(),
                               ~"use core::util::with;", false);