about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2015-01-17 16:15:52 -0800
committerAaron Turon <aturon@mozilla.com>2015-01-21 08:11:07 -0800
commita506d4cbfe8f20a2725c7efd9d43359a0bbd0e9e (patch)
treed3cc252236786a58efbdd2b3c4bf3f12af88039e /src/libsyntax/parse/lexer
parent092ba6a8563b5c95f5aa53a705eaba6cc94e2da7 (diff)
downloadrust-a506d4cbfe8f20a2725c7efd9d43359a0bbd0e9e.tar.gz
rust-a506d4cbfe8f20a2725c7efd9d43359a0bbd0e9e.zip
Fallout from stabilization.
Diffstat (limited to 'src/libsyntax/parse/lexer')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 4cdafb36eec..7852b077b53 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -271,9 +271,9 @@ impl<'a> StringReader<'a> {
     fn with_str_from_to<T, F>(&self, start: BytePos, end: BytePos, f: F) -> T where
         F: FnOnce(&str) -> T,
     {
-        f(self.filemap.src.slice(
-                self.byte_offset(start).to_uint(),
-                self.byte_offset(end).to_uint()))
+        f(&self.filemap.src[
+                self.byte_offset(start).to_uint()..
+                self.byte_offset(end).to_uint()])
     }
 
     /// Converts CRLF to LF in the given string, raising an error on bare CR.