diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-05-13 18:22:18 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-05-14 14:11:07 -0400 |
| commit | 4a9d8ff1a7ee6e832cceb582cb213ac6444f09b6 (patch) | |
| tree | 8033b9006cb2a1121939d392f0b4fa05bc0a2837 | |
| parent | 54f2147e8eb49507e419b2129a08bfd1585f7e77 (diff) | |
| download | rust-4a9d8ff1a7ee6e832cceb582cb213ac6444f09b6.tar.gz rust-4a9d8ff1a7ee6e832cceb582cb213ac6444f09b6.zip | |
Fix `use` statements with rusti
| -rw-r--r-- | src/librusti/rusti.rc | 3 |
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); |
