summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-01 03:45:44 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-01 21:56:53 -0800
commitfceec03da005edc82c90f1cbe1d102e8f365bad0 (patch)
tree947e5b433fe4a7b44860697c6d7bc17e54af3647 /src/compiletest
parent6156bc56cbd1f40e538b59ff91ce9b8d89969ff3 (diff)
downloadrust-fceec03da005edc82c90f1cbe1d102e8f365bad0.tar.gz
rust-fceec03da005edc82c90f1cbe1d102e8f365bad0.zip
Propagating unsafe::slice 3
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/errors.rs6
-rw-r--r--src/compiletest/header.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index e0c4bf6b654..014419a2aeb 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -22,7 +22,7 @@ fn load_errors(testfile: str) -> [expected_error] {
     ret error_patterns;
 }
 
-fn parse_expected(line_num: uint, line: str) -> [expected_error] {
+fn parse_expected(line_num: uint, line: str) -> [expected_error] unsafe {
     let error_tag = "//!";
     let idx0 = str::find(line, error_tag);
     if idx0 < 0 { ret []; }
@@ -41,11 +41,11 @@ fn parse_expected(line_num: uint, line: str) -> [expected_error] {
     while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
     let start_kind = idx;
     while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
-    let kind = str::to_lower(str::slice(line, start_kind, idx));
+    let kind = str::to_lower(str::unsafe::slice(line, start_kind, idx));
 
     // Extract msg:
     while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
-    let msg = str::slice(line, idx, len);
+    let msg = str::unsafe::slice(line, idx, len);
 
     #debug("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
 
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index ec881caebbc..0f666528210 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -104,12 +104,12 @@ fn parse_name_directive(line: str, directive: str) -> bool {
 }
 
 fn parse_name_value_directive(line: str,
-                              directive: str) -> option<str> {
+                              directive: str) -> option<str> unsafe {
     let keycolon = directive + ":";
     if str::find(line, keycolon) >= 0 {
         let colon = str::find(line, keycolon) as uint;
         let value =
-            str::slice(line, colon + str::byte_len(keycolon),
+            str::unsafe::slice(line, colon + str::byte_len(keycolon),
                        str::byte_len(line));
         #debug("%s: %s", directive,  value);
         option::some(value)