diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-07-02 12:47:32 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-07-17 14:57:51 -0700 |
| commit | 99b33f721954bc5290f9201c8f64003c294d0571 (patch) | |
| tree | 786c9bf75d54512d0a80f6975ad40516ab432c3a /src/libsyntax/parse/token.rs | |
| parent | b4e674f6e662bc80f2e7a5a1a9834f2152f08d32 (diff) | |
| download | rust-99b33f721954bc5290f9201c8f64003c294d0571.tar.gz rust-99b33f721954bc5290f9201c8f64003c294d0571.zip | |
librustc: Remove all uses of "copy".
Diffstat (limited to 'src/libsyntax/parse/token.rs')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 01860c3ae99..8e14e56439e 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -20,7 +20,7 @@ use std::local_data; use std::rand; use std::rand::RngUtil; -#[deriving(Encodable, Decodable, Eq, IterBytes)] +#[deriving(Clone, Encodable, Decodable, Eq, IterBytes)] pub enum binop { PLUS, MINUS, @@ -34,7 +34,7 @@ pub enum binop { SHR, } -#[deriving(Encodable, Decodable, Eq, IterBytes)] +#[deriving(Clone, Encodable, Decodable, Eq, IterBytes)] pub enum Token { /* Expression-operator symbols. */ EQ, @@ -95,7 +95,7 @@ pub enum Token { EOF, } -#[deriving(Encodable, Decodable, Eq, IterBytes)] +#[deriving(Clone, Encodable, Decodable, Eq, IterBytes)] /// For interpolation during macro expansion. pub enum nonterminal { nt_item(@ast::item), @@ -350,8 +350,8 @@ pub mod special_idents { * Maps a token to a record specifying the corresponding binary * operator */ -pub fn token_to_binop(tok: Token) -> Option<ast::binop> { - match tok { +pub fn token_to_binop(tok: &Token) -> Option<ast::binop> { + match *tok { BINOP(STAR) => Some(ast::mul), BINOP(SLASH) => Some(ast::div), BINOP(PERCENT) => Some(ast::rem), |
