about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-22 23:46:45 -0800
committerMarijn Haverbeke <marijnh@gmail.com>2012-02-23 17:00:19 +0100
commit6ea3d7935efba59d0b9d81f233e66ea69f1e1016 (patch)
tree9a0b15de841f729a811fe8b5dedab0f94b6cba87 /src/comp/syntax
parent280633a7283c21c6d95a556816bfb698845c34d8 (diff)
downloadrust-6ea3d7935efba59d0b9d81f233e66ea69f1e1016.tar.gz
rust-6ea3d7935efba59d0b9d81f233e66ea69f1e1016.zip
(core::str) replace byte_index[_from] with index[_from]
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/codemap.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp/syntax/codemap.rs b/src/comp/syntax/codemap.rs
index 74dbade09c1..abe5a242261 100644
--- a/src/comp/syntax/codemap.rs
+++ b/src/comp/syntax/codemap.rs
@@ -157,7 +157,7 @@ fn span_to_lines(sp: span, cm: codemap::codemap) -> @file_lines {
 
 fn get_line(fm: filemap, line: int) -> str unsafe {
     let begin: uint = fm.lines[line].byte - fm.start_pos.byte;
-    let end = alt str::byte_index_from(*fm.src, '\n' as u8, begin,
+    let end = alt str::index_from(*fm.src, '\n', begin,
                                   str::len_bytes(*fm.src)) {
       some(e) { e }
       none { str::len_bytes(*fm.src) }