diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-12-11 15:16:36 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-12-13 16:14:28 -0800 |
| commit | d809e89c2682c3bb0ec0b58d7a8beb71060ae619 (patch) | |
| tree | 3e31eb1e518adf5f6c27dab2390b2973e95c7b6e /src/libcore/repr.rs | |
| parent | 742f354ffb08d81f6977aabc78a854cced22b9d3 (diff) | |
Replace some Eq impls with deriving_eq
Diffstat (limited to 'src/libcore/repr.rs')
| -rw-r--r-- | src/libcore/repr.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libcore/repr.rs b/src/libcore/repr.rs index 9a0cfeefd60..46bef4dd68a 100644 --- a/src/libcore/repr.rs +++ b/src/libcore/repr.rs @@ -518,6 +518,7 @@ fn test_repr2() { // Old non-factored implementation, transitional... +#[deriving_eq] enum EnumVisitState { PreVariant, // We're before the variant we're interested in. InVariant, // We're inside the variant we're interested in. @@ -525,13 +526,6 @@ enum EnumVisitState { Degenerate // This is a degenerate enum (exactly 1 variant) } -impl EnumVisitState : cmp::Eq { - pure fn eq(&self, other: &EnumVisitState) -> bool { - ((*self) as uint) == ((*other) as uint) - } - pure fn ne(&self, other: &EnumVisitState) -> bool { !(*self).eq(other) } -} - struct EnumState { end_ptr: *c_void, state: EnumVisitState |
