about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-10 14:56:47 -0800
committerbors <bors@rust-lang.org>2014-02-10 14:56:47 -0800
commit38ed4674e8054ee854871303401bffed7c05b01b (patch)
tree59745ee9aa34079821e8afa2274a4bc83e98254d /src/libsyntax/parse/parser.rs
parentcf9164f94c6a7e3717f67b1fb74a7662639835f0 (diff)
parente9ff91e9beb6c92d9662242c1090c507b1611c59 (diff)
downloadrust-38ed4674e8054ee854871303401bffed7c05b01b.tar.gz
rust-38ed4674e8054ee854871303401bffed7c05b01b.zip
auto merge of #11956 : edwardw/rust/issue-7556, r=cmr
Closes #7556.

Also move ``std::util::Void`` to ``std::any::Void``. It makes more sense to me.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index fd8b945a177..507debc8ce0 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -82,7 +82,7 @@ use opt_vec::OptVec;
 use std::cell::Cell;
 use std::hashmap::HashSet;
 use std::kinds::marker;
-use std::util;
+use std::mem::replace;
 use std::vec;
 
 #[allow(non_camel_case_types)]
@@ -735,7 +735,7 @@ impl Parser {
         let next = if self.buffer_start == self.buffer_end {
             self.reader.next_token()
         } else {
-            // Avoid token copies with `util::replace`.
+            // Avoid token copies with `replace`.
             let buffer_start = self.buffer_start as uint;
             let next_index = (buffer_start + 1) & 3 as uint;
             self.buffer_start = next_index as int;
@@ -744,7 +744,7 @@ impl Parser {
                 tok: token::UNDERSCORE,
                 sp: self.span,
             };
-            util::replace(&mut self.buffer[buffer_start], placeholder)
+            replace(&mut self.buffer[buffer_start], placeholder)
         };
         self.span = next.sp;
         self.token = next.tok;
@@ -753,7 +753,7 @@ impl Parser {
 
     // Advance the parser by one token and return the bumped token.
     pub fn bump_and_get(&mut self) -> token::Token {
-        let old_token = util::replace(&mut self.token, token::UNDERSCORE);
+        let old_token = replace(&mut self.token, token::UNDERSCORE);
         self.bump();
         old_token
     }