diff options
| author | Kevin Cantu <me@kevincantu.org> | 2012-02-11 01:57:39 -0800 |
|---|---|---|
| committer | Kevin Cantu <me@kevincantu.org> | 2012-02-11 16:39:39 -0800 |
| commit | a131b430a0e2e227c8771212dc5f469cd08e5dce (patch) | |
| tree | 78212a18a6b3404c2283cb96d796168418479456 /src/comp | |
| parent | 4339307359eaca1ae1fd5de96eec746e96a90564 (diff) | |
| download | rust-a131b430a0e2e227c8771212dc5f469cd08e5dce.tar.gz rust-a131b430a0e2e227c8771212dc5f469cd08e5dce.zip | |
core::str rename [r]index -> [r]index_bytes
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/back/link.rs | 2 | ||||
| -rw-r--r-- | src/comp/syntax/codemap.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/back/link.rs b/src/comp/back/link.rs index cb2070c124c..4f32ad4a31f 100644 --- a/src/comp/back/link.rs +++ b/src/comp/back/link.rs @@ -109,7 +109,7 @@ mod write { // Decides what to call an intermediate file, given the name of the output // and the extension to use. fn mk_intermediate_name(output_path: str, extension: str) -> str unsafe { - let dot_pos = str::index(output_path, '.' as u8); + let dot_pos = str::index_byte(output_path, '.' as u8); let stem; if dot_pos < 0 { stem = output_path; diff --git a/src/comp/syntax/codemap.rs b/src/comp/syntax/codemap.rs index 5d8d7ff5633..27f968b1156 100644 --- a/src/comp/syntax/codemap.rs +++ b/src/comp/syntax/codemap.rs @@ -125,7 +125,7 @@ fn get_line(fm: filemap, line: int) -> str unsafe { // the remainder of the file, which is undesirable. end = str::byte_len(*fm.src); let rest = str::unsafe::slice_bytes(*fm.src, begin, end); - let newline = str::index(rest, '\n' as u8); + let newline = str::index_byte(rest, '\n' as u8); if newline != -1 { end = begin + (newline as uint); } } ret str::unsafe::slice_bytes(*fm.src, begin, end); |
