Skip to content

Commit f21fbc2

Browse files
committed
Fixed another performance issue
1 parent 9bdb2c9 commit f21fbc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/parse/comments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ fn gather_comments_and_literals(span_diagnostic: diagnostic::span_handler,
203203
let {tok: tok, sp: sp} = rdr.next_token();
204204
if token::is_lit(tok) {
205205
let s = get_str_from(rdr, bstart);
206-
literals += [{lit: s, pos: sp.lo}];
206+
vec::push(literals, {lit: s, pos: sp.lo});
207207
log(debug, "tok lit: " + s);
208208
} else {
209209
log(debug, "tok: " + token::to_str(*rdr.interner, tok));

0 commit comments

Comments
 (0)