diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-02-24 09:54:41 -0800 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-02-25 21:45:46 -0800 |
| commit | 4650da5888427b60c6d38308bcdd76da40f1b181 (patch) | |
| tree | eb51a60e4f2ae1c8590a55c6743de4e7c1b4d912 /src/libsyntax/parse/common.rs | |
| parent | 1deb858b2217cd9107bef4d64d35f1489f77f2ff (diff) | |
| download | rust-4650da5888427b60c6d38308bcdd76da40f1b181.tar.gz rust-4650da5888427b60c6d38308bcdd76da40f1b181.zip | |
libsyntax: change eat to take a &token
Diffstat (limited to 'src/libsyntax/parse/common.rs')
| -rw-r--r-- | src/libsyntax/parse/common.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs index 0317ae14e8c..e336b2bb814 100644 --- a/src/libsyntax/parse/common.rs +++ b/src/libsyntax/parse/common.rs @@ -103,8 +103,8 @@ pub impl Parser { // consume token 'tok' if it exists. Returns true if the given // token was present, false otherwise. - fn eat(tok: token::Token) -> bool { - return if *self.token == tok { self.bump(); true } else { false }; + fn eat(tok: &token::Token) -> bool { + return if *self.token == *tok { self.bump(); true } else { false }; } // Storing keywords as interned idents instead of strings would be nifty. |
