diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-03-19 21:24:01 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-03-20 00:33:15 -0400 |
| commit | cd7f3ad22eb480426306be78e2ca9f09497edd34 (patch) | |
| tree | aea53ccedcf9f57a0982067f03675fa04fe67a7c /src/libsyntax/parse/comments.rs | |
| parent | 251d0c4557a2f484a6fce1b91e217034b5c82dd3 (diff) | |
| download | rust-cd7f3ad22eb480426306be78e2ca9f09497edd34.tar.gz rust-cd7f3ad22eb480426306be78e2ca9f09497edd34.zip | |
syntax: Removing some bad copies
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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)); } |
