diff options
| author | Andrew Paseltiner <apaseltiner@gmail.com> | 2013-03-26 08:04:54 -0400 |
|---|---|---|
| committer | Andrew Paseltiner <apaseltiner@gmail.com> | 2013-03-27 22:04:23 -0400 |
| commit | f02ee42a869fea6fbfcea27b79fb71fbd5a055ec (patch) | |
| tree | ed6a17927a2a9bfd7b337338ffb9572d6e188ede /src/libsyntax/parse/comments.rs | |
| parent | f7f6013a625cefcf914ed890c297a87dacf7bb91 (diff) | |
| download | rust-f02ee42a869fea6fbfcea27b79fb71fbd5a055ec.tar.gz rust-f02ee42a869fea6fbfcea27b79fb71fbd5a055ec.zip | |
derive Eq and Clone impls where applicable
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 1b6b25db38a..e5685cdb4c7 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -20,13 +20,13 @@ use parse::lexer; use parse::token; use parse; -use core::cmp; use core::io::ReaderUtil; use core::io; use core::str; use core::uint; use core::vec; +#[deriving(Eq)] pub enum cmnt_style { isolated, // No code on either side of each line of the comment trailing, // Code exists to the left of the comment @@ -34,15 +34,6 @@ pub enum cmnt_style { blank_line, // Just a manual blank line "\n\n", for layout } -impl cmp::Eq for cmnt_style { - fn eq(&self, other: &cmnt_style) -> bool { - ((*self) as uint) == ((*other) as uint) - } - fn ne(&self, other: &cmnt_style) -> bool { - ((*self) as uint) != ((*other) as uint) - } -} - pub struct cmnt { style: cmnt_style, lines: ~[~str], |
