about summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-08 05:35:51 +0000
committerbors <bors@rust-lang.org>2015-01-08 05:35:51 +0000
commit5b3cd3900ceda838f5798c30ab96ceb41f962534 (patch)
tree7593bacffb7c8111eee7fa2a0a05d0357ccba763 /src/libsyntax/parse/token.rs
parent9f1ead8fadc56bad30dc74f5cc50d78af4fbc972 (diff)
parent0abf4583486071a958aa1bd14ab8c5b8870fb74d (diff)
downloadrust-5b3cd3900ceda838f5798c30ab96ceb41f962534.tar.gz
rust-5b3cd3900ceda838f5798c30ab96ceb41f962534.zip
auto merge of #20733 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 43786738910..4b3573f84c5 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -480,7 +480,7 @@ macro_rules! declare_special_idents_and_keywords {(
         $(init_vec.push($si_str);)*
         $(init_vec.push($sk_str);)*
         $(init_vec.push($rk_str);)*
-        interner::StrInterner::prefill(init_vec.index(&FullRange))
+        interner::StrInterner::prefill(&init_vec[])
     }
 }}
 
@@ -629,7 +629,7 @@ impl InternedString {
 
     #[inline]
     pub fn get<'a>(&'a self) -> &'a str {
-        self.string.index(&FullRange)
+        &self.string[]
     }
 }
 
@@ -659,41 +659,41 @@ impl fmt::Show for InternedString {
 
 impl fmt::String for InternedString {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.string.index(&FullRange))
+        write!(f, "{}", &self.string[])
     }
 }
 
 impl<'a> PartialEq<&'a str> for InternedString {
     #[inline(always)]
     fn eq(&self, other: & &'a str) -> bool {
-        PartialEq::eq(self.string.index(&FullRange), *other)
+        PartialEq::eq(&self.string[], *other)
     }
     #[inline(always)]
     fn ne(&self, other: & &'a str) -> bool {
-        PartialEq::ne(self.string.index(&FullRange), *other)
+        PartialEq::ne(&self.string[], *other)
     }
 }
 
 impl<'a> PartialEq<InternedString > for &'a str {
     #[inline(always)]
     fn eq(&self, other: &InternedString) -> bool {
-        PartialEq::eq(*self, other.string.index(&FullRange))
+        PartialEq::eq(*self, &other.string[])
     }
     #[inline(always)]
     fn ne(&self, other: &InternedString) -> bool {
-        PartialEq::ne(*self, other.string.index(&FullRange))
+        PartialEq::ne(*self, &other.string[])
     }
 }
 
 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()).index(&FullRange))))
+        Ok(get_name(get_ident_interner().intern(&try!(d.read_str())[])))
     }
 }
 
 impl Encodable for InternedString {
     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_str(self.string.index(&FullRange))
+        s.emit_str(&self.string[])
     }
 }