about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-04-01 20:39:26 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-04-02 15:56:31 -0700
commit9a259f4303cd6550a38ccd12b07ae14c1e21a263 (patch)
tree07ce928ee77fea3d2b0a1d0bbfe021038bd0d708 /src/libsyntax/parse/parser.rs
parent46abacfdfebf3978b5bf39673d0b751636dd2257 (diff)
downloadrust-9a259f4303cd6550a38ccd12b07ae14c1e21a263.tar.gz
rust-9a259f4303cd6550a38ccd12b07ae14c1e21a263.zip
Fix fallout of requiring uint indices
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 83cc92d4828..b3e488a464d 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -780,10 +780,10 @@ impl<'a> Parser<'a> {
                       -> R {
         let dist = distance as int;
         while self.buffer_length() < dist {
-            self.buffer[self.buffer_end] = self.reader.next_token();
+            self.buffer[self.buffer_end as uint] = self.reader.next_token();
             self.buffer_end = (self.buffer_end + 1) & 3;
         }
-        f(&self.buffer[(self.buffer_start + dist - 1) & 3].tok)
+        f(&self.buffer[((self.buffer_start + dist - 1) & 3) as uint].tok)
     }
     pub fn fatal(&mut self, m: &str) -> ! {
         self.sess.span_diagnostic.span_fatal(self.span, m)