From cd7f3ad22eb480426306be78e2ca9f09497edd34 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 19 Mar 2013 21:24:01 -0400 Subject: syntax: Removing some bad copies --- src/libsyntax/parse/comments.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse/comments.rs') diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index b6ec3aff44d..98208bf9f76 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -220,7 +220,7 @@ fn trim_whitespace_prefix_and_push_line(lines: &mut ~[~str], if col < len { s1 = str::slice(s, col, len); } else { s1 = ~""; } - } else { s1 = /*bad*/ copy s; } + } else { s1 = s; } debug!("pushing line: %s", s1); lines.push(s1); } @@ -357,8 +357,8 @@ pub fn gather_comments_and_literals(span_diagnostic: let TokenAndSpan {tok: tok, sp: sp} = rdr.peek(); if token::is_lit(&tok) { let s = get_str_from(rdr, bstart); - literals.push(lit {lit: /*bad*/ copy s, pos: sp.lo}); debug!("tok lit: %s", s); + literals.push(lit {lit: s, pos: sp.lo}); } else { debug!("tok: %s", token::to_str(rdr.interner, &tok)); } -- cgit 1.4.1-3-g733a5