From 9a259f4303cd6550a38ccd12b07ae14c1e21a263 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 1 Apr 2014 20:39:26 -0700 Subject: Fix fallout of requiring uint indices --- src/libsyntax/parse/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse/parser.rs') 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) -- cgit 1.4.1-3-g733a5