Skip to content

Commit 794f664

Browse files
committed
syntax: Don't copy source string
1 parent 21087bf commit 794f664

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libsyntax/parse.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ fn new_parser_from_file(sess: parse_sess, cfg: ast::crate_cfg, +path: str,
148148
result::ok(_) { /* Continue. */ }
149149
result::err(e) { sess.span_diagnostic.handler().fatal(e); }
150150
}
151-
// FIXME: This copy is unfortunate (#2319).
152-
let src = @copy result::unwrap(res);
151+
let src = @result::unwrap(res);
153152
let filemap = codemap::new_filemap(path, src, sess.chpos, sess.byte_pos);
154153
sess.cm.files.push(filemap);
155154
let itr = @interner::mk::<@str>({|x|str::hash(*x)}, {|x,y|str::eq(*x, *y)});

0 commit comments

Comments
 (0)