rustc: Make shape-based compare glue never called for comparison operators.

Only called for string patterns.
This commit is contained in:
Patrick Walton
2012-09-07 18:53:14 -07:00
parent 9a15c50f6c
commit 22b8757705
22 changed files with 322 additions and 82 deletions

View File

@@ -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 {