diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-09-07 12:06:02 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-09-07 12:24:48 -0700 |
| commit | feb014eb3c3aa1ccaae1df407801dffa090499fd (patch) | |
| tree | 8ffeec6945de4843f9e0d150720596327530e00f /src/libsyntax/codemap.rs | |
| parent | ac1f84c153a171e641233e5d2d11404a0b520986 (diff) | |
rustc: Add an "ne" method to the Eq trait, and implement it everywhere
Diffstat (limited to 'src/libsyntax/codemap.rs')
| -rw-r--r-- | src/libsyntax/codemap.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 40e51adc293..2e3c556084f 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -36,6 +36,7 @@ impl file_pos: cmp::Eq { pure fn eq(&&other: file_pos) -> bool { self.ch == other.ch && self.byte == other.byte } + pure fn ne(&&other: file_pos) -> bool { !self.eq(other) } } /* A codemap is a thing that maps uints to file/line/column positions @@ -174,6 +175,7 @@ impl span : cmp::Eq { pure fn eq(&&other: span) -> bool { return self.lo == other.lo && self.hi == other.hi; } + pure fn ne(&&other: span) -> bool { !self.eq(other) } } fn span_to_str_no_adj(sp: span, cm: codemap) -> ~str { |
