about summary refs log tree commit diff
path: root/src/libsyntax/attr.rs
diff options
context:
space:
mode:
authorAndrew Paseltiner <apaseltiner@gmail.com>2013-03-26 08:04:54 -0400
committerAndrew Paseltiner <apaseltiner@gmail.com>2013-03-27 22:04:23 -0400
commitf02ee42a869fea6fbfcea27b79fb71fbd5a055ec (patch)
treeed6a17927a2a9bfd7b337338ffb9572d6e188ede /src/libsyntax/attr.rs
parentf7f6013a625cefcf914ed890c297a87dacf7bb91 (diff)
downloadrust-f02ee42a869fea6fbfcea27b79fb71fbd5a055ec.tar.gz
rust-f02ee42a869fea6fbfcea27b79fb71fbd5a055ec.zip
derive Eq and Clone impls where applicable
Diffstat (limited to 'src/libsyntax/attr.rs')
-rw-r--r--src/libsyntax/attr.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs
index b22d71afaed..90e8c0aa616 100644
--- a/src/libsyntax/attr.rs
+++ b/src/libsyntax/attr.rs
@@ -19,7 +19,6 @@ use codemap::BytePos;
 use diagnostic::span_handler;
 use parse::comments::{doc_comment_style, strip_doc_comment_decoration};
 
-use core::cmp;
 use core::either::Either;
 use core::vec;
 use core::hashmap::linear::LinearSet;
@@ -325,6 +324,7 @@ pub fn foreign_abi(attrs: &[ast::attribute])
     };
 }
 
+#[deriving(Eq)]
 pub enum inline_attr {
     ia_none,
     ia_hint,
@@ -332,13 +332,6 @@ pub enum inline_attr {
     ia_never,
 }
 
-impl cmp::Eq for inline_attr {
-    fn eq(&self, other: &inline_attr) -> bool {
-        ((*self) as uint) == ((*other) as uint)
-    }
-    fn ne(&self, other: &inline_attr) -> bool { !(*self).eq(other) }
-}
-
 /// True if something like #[inline] is found in the list of attrs.
 pub fn find_inline_attr(attrs: &[ast::attribute]) -> inline_attr {
     // FIXME (#2809)---validate the usage of #[inline] and #[inline(always)]