Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enum equality no longer works #3557

Closed
jesse99 opened this issue Sep 22, 2012 · 4 comments
Closed

enum equality no longer works #3557

jesse99 opened this issue Sep 22, 2012 · 4 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@jesse99
Copy link
Contributor

jesse99 commented Sep 22, 2012

With master pulled on Sep 22, 2012 it fails with failed to find an implementation of trait @core::cmp::Eq for MyEnum.

(I know that this is a known issue, but it's good to formally track it, especially if it isn't fixed for 0.4).

@jesse99
Copy link
Contributor Author

jesse99 commented Sep 22, 2012

Not sure what the best work around is. Enums are often complicated enough that hand-writing an equality function is a pita. I've been using fmt!("%?", my_enum) in unit tests which more or less works. But that is now broken for recursive enums, see #3556.

@pcwalton
Copy link
Contributor

We will need the deriving feature to be added for this to work. For enums with no payloads (self as uint) == (other as uint) works fine. But for others it's a nuisance.

@kud1ing
Copy link

kud1ing commented Feb 11, 2013

Can this be closed?

@thestinger
Copy link
Contributor

Closing since #[deriving_eq] exists now.

RalfJung pushed a commit to RalfJung/rust that referenced this issue May 4, 2024
Move sched_getaffinity back to Linux

This reverts commit c1a3f8576ea12b0bed68ad3dedf4069ca3d9816f. The shim isn't actually useful for anything, and it is untested on FreeBSD. On Linux it exists solely because std and num_cpus are trying this before falling back to `sysconf`, but on FreeBSD that's not how they work, so there's no reason I can see to have this stub shim on FreeBSD.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

4 participants