about summary refs log tree commit diff
path: root/src/compiletest/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-11-07 19:16:11 -0800
committerbors <bors@rust-lang.org>2013-11-07 19:16:11 -0800
commit27eb85daed8ddf2a59942d3722541aed288b29af (patch)
treead0fba2a564bdf95c50eb0dfba8b734e2a0e4359 /src/compiletest/errors.rs
parentf00bb2ec0462cba7ad9be04db44a3b1255aaafc6 (diff)
parentb95a8c63fd7f89d38dc5ddee106cb0865274874e (diff)
downloadrust-27eb85daed8ddf2a59942d3722541aed288b29af.tar.gz
rust-27eb85daed8ddf2a59942d3722541aed288b29af.zip
auto merge of #10333 : huonw/rust/ascii, r=alexcrichton
This renames to_str_ascii to as_str_ascii and makes it non-copying,
which is possible now that strings no longer have a hidden extra
byte/null terminator.

Fixes #6120.
Diffstat (limited to 'src/compiletest/errors.rs')
-rw-r--r--src/compiletest/errors.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index 8bfef9da805..dcb0d2ef01d 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -52,10 +52,8 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
     let start_kind = idx;
     while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
 
-    // FIXME: #4318 Instead of to_ascii and to_str_ascii, could use
-    // to_ascii_consume and to_str_consume to not do a unnecessary copy.
     let kind = line.slice(start_kind, idx);
-    let kind = kind.to_ascii().to_lower().to_str_ascii();
+    let kind = kind.to_ascii().to_lower().into_str();
 
     // Extract msg:
     while idx < len && line[idx] == (' ' as u8) { idx += 1u; }