-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
TotalEq shouldn't need to have the secret method just for #[deriving] #13101
Comments
This secret method escapes into the error message when someone tries to derive(Eq) on something that isn't TotalEq. It was pretty hard to figure out what was wrong and I had to ask in #rust-internals before I managed to fix it. |
I think that deriving must have made progress since it was originally written, this was a pretty easy change! Closes rust-lang#13101
It's now |
Triage: no change. |
I'm not sure why the restriction exists in the first place: For
is illegal, while
is legal. |
The error message is improved in #36384, but
|
The method is stable, but relatively well hidden. Is there anything that can be done about it, except removing it in "Rust 2"? It could be marked deprecated.. |
Nominating for libs team discussion, perhaps we could just deprecate and eventually remove the method of it doesn't do anything? I doubt that anyone is using it in practice. Searching for it on GitHub leads me to believe that most matches are in copied versions of either libsyntax or libcore, which seems "hey, you're unstable anyway" to me. |
Discussed at libs traige and the decision was to close, we aren't going to remove these stable methods. |
remove FIXME(rust-lang#13101) since `assert_receiver_is_total_eq` stays. remove FIXME(rust-lang#19649) now that stability markers render. remove FIXME(rust-lang#13642) now the benchmarks were moved. remove FIXME(rust-lang#6220) now that floating points can be formatted. remove FIXME(rust-lang#18248) and write tests for `Rc<str>` and `Rc<[u8]>` remove reference to irelevent issues in FIXME(rust-lang#1697, rust-lang#2178...) update FIXME(rust-lang#5516) to point to getopts issue 7 update FIXME(rust-lang#7771) to point to RFC 628 update FIXME(rust-lang#19839) to point to issue 26925
internal: Re-export standard semantic token types and mods Should help in preventing future occurences of rust-lang#13099 by having all token types and mods come through the same place
The
assert_receiver_is_total_eq
method is purely so that#[deriving]
can enforce that all the contained types areTotalEq
. It currently exists because the#[deriving]
infrastructure makes it much much much easier to work with a method on a trait than with anything else.Preferably
#[deriving]
would be refactored to allow creating a non trait function along the lines ofwhich would allow
TotalEq
to become justtrait TotalEq: Eq {}
.(Placeholder issue for now.)
The text was updated successfully, but these errors were encountered: