about summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-01-04 17:43:24 +1300
committerNick Cameron <ncameron@mozilla.com>2015-01-07 12:02:52 +1300
commit0c7f7a5fb8919c6a382f9acd1e921c51f807f625 (patch)
tree74a8f54870574e503df68fd62d799552c8664cf8 /src/libsyntax/parse/token.rs
parent791f5456859845a4a1814eca45aa900fc62d4e44 (diff)
downloadrust-0c7f7a5fb8919c6a382f9acd1e921c51f807f625.tar.gz
rust-0c7f7a5fb8919c6a382f9acd1e921c51f807f625.zip
fallout
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index ada463a40cb..f70ce54bb1c 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -689,8 +689,7 @@ impl<D:Decoder<E>, E> Decodable<D, E> for InternedString {
 #[cfg(not(stage0))]
 impl Decodable for InternedString {
     fn decode<D: Decoder>(d: &mut D) -> Result<InternedString, D::Error> {
-        Ok(get_name(get_ident_interner().intern(
-                    try!(d.read_str())[])))
+        Ok(get_name(get_ident_interner().intern(try!(d.read_str()).index(&FullRange))))
     }
 }
 
@@ -704,7 +703,7 @@ impl<S:Encoder<E>, E> Encodable<S, E> for InternedString {
 #[cfg(not(stage0))]
 impl Encodable for InternedString {
     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_str(self.string[])
+        s.emit_str(self.string.index(&FullRange))
     }
 }