diff options
| author | Kevin Cantu <me@kevincantu.org> | 2012-02-01 03:45:44 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-02-01 21:56:53 -0800 |
| commit | fceec03da005edc82c90f1cbe1d102e8f365bad0 (patch) | |
| tree | 947e5b433fe4a7b44860697c6d7bc17e54af3647 /src/compiletest/errors.rs | |
| parent | 6156bc56cbd1f40e538b59ff91ce9b8d89969ff3 (diff) | |
| download | rust-fceec03da005edc82c90f1cbe1d102e8f365bad0.tar.gz rust-fceec03da005edc82c90f1cbe1d102e8f365bad0.zip | |
Propagating unsafe::slice 3
Diffstat (limited to 'src/compiletest/errors.rs')
| -rw-r--r-- | src/compiletest/errors.rs | 6 |
1 files changed, 3 insertions, 3 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); |
