From 99b33f721954bc5290f9201c8f64003c294d0571 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 2 Jul 2013 12:47:32 -0700 Subject: librustc: Remove all uses of "copy". --- src/libsyntax/parse/token.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libsyntax/parse/token.rs') 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 { - match tok { +pub fn token_to_binop(tok: &Token) -> Option { + match *tok { BINOP(STAR) => Some(ast::mul), BINOP(SLASH) => Some(ast::div), BINOP(PERCENT) => Some(ast::rem), -- cgit 1.4.1-3-g733a5