Uh oh!
There was an error while loading. Please reload this page.
Remove std::bool::{Bool, all_values} - #12473
Merged
Merged
Conversation
alexcrichton
commented
Feb 22, 2014
Member
I'm a little sad to see these go, I would rather see them as an inherent implementation on the |
brendanzab
commented
Feb 22, 2014
ContributorAuthor
I suggested changing the names of the operator traits in #12315, but it was almost universally shot down. I am going to add a |
brendanzab
commented
Feb 22, 2014
ContributorAuthor
Here is my proposed trait. I was going to put it in |
brendanzab
commented
Feb 23, 2014
ContributorAuthor
Added the |
huonw
commented
Feb 23, 2014
Contributor
👍 from me. |
These were never used outside of the tests
bors added a commit
that referenced
this pull request
Feb 25, 2014
These were never used outside of the tests.
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 25, 2022
…ykril fix: avoid adding enum parens in use path closerust-lang#12420
dingxiangfei2009 pushed a commit
to dingxiangfei2009/rust
that referenced
this pull request
Jul 28, 2024
…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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These were never used outside of the tests.