diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-09-19 18:00:26 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-09-20 09:48:05 -0700 |
| commit | 9117dcb968f96d0e9391dfac50348d4c031d89b3 (patch) | |
| tree | a571f0c2ef1f91370cae51527f0e0761212a82e7 /src/libsyntax/parse/comments.rs | |
| parent | 6b670c306b8de545afcbcea81bcd592c644409d7 (diff) | |
| download | rust-9117dcb968f96d0e9391dfac50348d4c031d89b3.tar.gz rust-9117dcb968f96d0e9391dfac50348d4c031d89b3.zip | |
rustc: De-mode all overloaded operators
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 7fcf7a032dc..214b9e3fbbd 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -17,6 +17,7 @@ enum cmnt_style { blank_line, // Just a manual blank line "\n\n", for layout } +#[cfg(stage0)] impl cmnt_style : cmp::Eq { pure fn eq(&&other: cmnt_style) -> bool { (self as uint) == (other as uint) @@ -25,6 +26,16 @@ impl cmnt_style : cmp::Eq { (self as uint) != (other as uint) } } +#[cfg(stage1)] +#[cfg(stage2)] +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}; |
