Revert "Eliminate a copy in syntax::parse::new_parser_from_file"

This reverts commit 2bb3b63ec4.

(I was confused.)
This commit is contained in:
Tim Chevalier
2012-04-30 11:52:07 -07:00
parent 2bb3b63ec4
commit 85fbfa25d7
15 changed files with 43 additions and 88 deletions

View File

@@ -78,7 +78,7 @@ fn parse_input(sess: session, cfg: ast::crate_cfg, input: str)
if !input_is_stdin(input) {
parse::parse_crate_from_file(input, cfg, sess.parse_sess)
} else {
let src = ~str::from_bytes(io::stdin().read_whole_stream());
let src = @str::from_bytes(io::stdin().read_whole_stream());
parse::parse_crate_from_source_str(input, src, cfg, sess.parse_sess)
}
}