diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-03-20 19:13:13 +0100 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-03-21 01:50:32 +0100 |
| commit | a7d296f24c785e359bfd6d9e491fd8854c3ad967 (patch) | |
| tree | dd86187e73441b9bc2bad0157a49f791baac6e06 /src/libsyntax/parse | |
| parent | b12714eff5dd2ccde118c520444990216739e006 (diff) | |
| download | rust-a7d296f24c785e359bfd6d9e491fd8854c3ad967.tar.gz rust-a7d296f24c785e359bfd6d9e491fd8854c3ad967.zip | |
renamed str::view -> slice_DBG_BRWD
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/parse/lexer.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 98208bf9f76..08473b0e7fb 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -76,7 +76,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { while j > i && lines[j - 1u].trim().is_empty() { j -= 1u; } - return lines.slice(i, j); + return lines.slice_V_DBG_BRWD(i, j).to_owned(); } // drop leftmost columns that contain only values in chars @@ -103,17 +103,17 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { if i > chars.len() { ~"" } else { - str::from_chars(chars.slice(i, chars.len())) + str::from_chars(chars.slice_V_DBG_BRWD(i, chars.len()).to_owned()) } }; } if comment.starts_with(~"//") { - return comment.slice(3u, comment.len()).trim(); + return comment.slice_DBG_BRWD(3u, comment.len()).trim(); } if comment.starts_with(~"/*") { - let lines = str::lines_any(comment.slice(3u, comment.len() - 2u)); + let lines = str::lines_any(comment.slice_DBG_BRWD(3u, comment.len() - 2u).to_owned()); let lines = vertical_trim(lines); let lines = block_trim(lines, ~"\t ", None); let lines = block_trim(lines, ~"*", Some(1u)); @@ -218,7 +218,7 @@ fn trim_whitespace_prefix_and_push_line(lines: &mut ~[~str], let col = col.to_uint(); if all_whitespace(s, 0u, uint::min(len, col)) { if col < len { - s1 = str::slice(s, col, len); + s1 = str::slice_DBG_BRWD(s, col, len).to_owned(); } else { s1 = ~""; } } else { s1 = s; } debug!("pushing line: %s", s1); diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index 90f51fe9b65..49f1d041b02 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -176,8 +176,8 @@ pub fn get_str_from(rdr: @mut StringReader, start: BytePos) -> ~str { unsafe { // I'm pretty skeptical about this subtraction. What if there's a // multi-byte character before the mark? - return str::slice(*rdr.src, start.to_uint() - 1u, - byte_offset(rdr).to_uint() - 1u); + return str::slice_DBG_BRWD(*rdr.src, start.to_uint() - 1u, + byte_offset(rdr).to_uint() - 1u).to_owned(); } } |
