about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-06-26 00:39:10 -0700
committerGitHub <noreply@github.com>2020-06-26 00:39:10 -0700
commit3d7521d31d3391f92efbe0cc53befd9634b34a71 (patch)
tree642ddb0ea6f425aa4808198242a1033b5953849f
parent7f6dfb451a1d71c0ffa39688cfdeb8f7500e11e1 (diff)
parent2792014ef4e2fdd02945f77cff19adf814f155d7 (diff)
downloadrust-3d7521d31d3391f92efbe0cc53befd9634b34a71.tar.gz
rust-3d7521d31d3391f92efbe0cc53befd9634b34a71.zip
Rollup merge of #73629 - flip1995:assoc_op_copy_clone, r=Manishearth
Make AssocOp Copy

Found that this enum is not `Copy` while reviewing this Clippy PR: https://github.com/rust-lang/rust-clippy/pull/5727#discussion_r443761621

There shouldn't be a reason why this should not be `Copy`.
-rw-r--r--src/librustc_ast/util/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_ast/util/parser.rs b/src/librustc_ast/util/parser.rs
index d8b44a22f2c..e5bcc571d41 100644
--- a/src/librustc_ast/util/parser.rs
+++ b/src/librustc_ast/util/parser.rs
@@ -5,7 +5,7 @@ use rustc_span::symbol::kw;
 /// Associative operator with precedence.
 ///
 /// This is the enum which specifies operator precedence and fixity to the parser.
-#[derive(PartialEq, Debug)]
+#[derive(Copy, Clone, PartialEq, Debug)]
 pub enum AssocOp {
     /// `+`
     Add,