From 22b875770543ec1fe93cfb35fd07c692db5675e2 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 7 Sep 2012 18:53:14 -0700 Subject: rustc: Make shape-based compare glue never called for comparison operators. Only called for string patterns. --- src/libsyntax/parse/comments.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index b85262cb79d..7fcf7a032dc 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -17,6 +17,15 @@ enum cmnt_style { blank_line, // Just a manual blank line "\n\n", for layout } +impl cmnt_style : cmp::Eq { + pure fn eq(&&other: cmnt_style) -> bool { + (self as uint) == (other as uint) + } + pure fn ne(&&other: cmnt_style) -> bool { + (self as uint) != (other as uint) + } +} + type cmnt = {style: cmnt_style, lines: ~[~str], pos: uint}; fn is_doc_comment(s: ~str) -> bool { -- cgit 1.4.1-3-g733a5