-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove std::bool::{Bool, all_values} #12473
Conversation
I'm a little sad to see these go, I would rather see them as an inherent implementation on the |
I suggested changing the names of the operator traits in #12315, but it was almost universally shot down. I am going to add a |
Here is my proposed trait. I was going to put it in |
Added the |
👍 from me. |
These were never used outside of the tests
These were never used outside of the tests.
…ykril fix: avoid adding enum parens in use path close rust-lang#12420
…endoo Fix handling of `Deref` in `assigning_clones` The `assigning_clones` lint had a special case for producing a bit nicer code for mutable references: ```rust fn clone_function_lhs_mut_ref(mut_thing: &mut HasCloneFrom, ref_thing: &HasCloneFrom) { *mut_thing = Clone::clone(ref_thing); } //v fn clone_function_lhs_mut_ref(mut_thing: &mut HasCloneFrom, ref_thing: &HasCloneFrom) { Clone::clone_from(mut_thing, ref_thing); } ``` However, this could [break](rust-lang/rust-clippy#12437) when combined with `Deref`. This PR removes the special case, so that the generated code should work more generally. Later we can improve the detection of `Deref` and put the special case back in a way that does not break code. Fixes: rust-lang/rust-clippy#12437 r? `@blyxyas` changelog: [`assigning_clones`]: change applicability to `Unspecified` and fix a problem with `Deref`.
These were never used outside of the tests.