rustc: Implement explicit self for Eq and Ord. r=graydon
This commit is contained in:
parent
4101587a88
commit
318e534895
89 changed files with 4175 additions and 92 deletions
|
@ -3743,10 +3743,20 @@ impl Parser {
|
|||
}
|
||||
|
||||
impl restriction : cmp::Eq {
|
||||
#[cfg(stage0)]
|
||||
pure fn eq(other: &restriction) -> bool {
|
||||
(self as uint) == ((*other) as uint)
|
||||
}
|
||||
#[cfg(stage1)]
|
||||
#[cfg(stage2)]
|
||||
pure fn eq(&self, other: &restriction) -> bool {
|
||||
((*self) as uint) == ((*other) as uint)
|
||||
}
|
||||
#[cfg(stage0)]
|
||||
pure fn ne(other: &restriction) -> bool { !self.eq(other) }
|
||||
#[cfg(stage1)]
|
||||
#[cfg(stage2)]
|
||||
pure fn ne(&self, other: &restriction) -> bool { !(*self).eq(other) }
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue