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/parser.rs | |
| parent | 6b670c306b8de545afcbcea81bcd592c644409d7 (diff) | |
| download | rust-9117dcb968f96d0e9391dfac50348d4c031d89b3.tar.gz rust-9117dcb968f96d0e9391dfac50348d4c031d89b3.zip | |
rustc: De-mode all overloaded operators
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a1c1208d21c..a6ad5b35484 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3647,12 +3647,21 @@ impl parser { } } +#[cfg(stage0)] impl restriction : cmp::Eq { pure fn eq(&&other: restriction) -> bool { (self as uint) == (other as uint) } pure fn ne(&&other: restriction) -> bool { !self.eq(other) } } +#[cfg(stage1)] +#[cfg(stage2)] +impl restriction : cmp::Eq { + pure fn eq(other: &restriction) -> bool { + (self as uint) == ((*other) as uint) + } + pure fn ne(other: &restriction) -> bool { !self.eq(other) } +} // // Local Variables: |
