-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Improve mut_mut
and collapsible_if
#1032
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
Conversation
@@ -1,6 +1,9 @@ | |||
# Change Log | |||
All notable changes to this project will be documented in this file. | |||
|
|||
## 0.0.78 — TBD | |||
* [`collapsible_if`] now consider `if let` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
considers
let y : &mut &mut &mut u32 = &mut &mut &mut 2; | ||
//~^ ERROR generally you want to avoid `&mut &mut | ||
//~| ERROR generally you want to avoid `&mut &mut | ||
//~| ERROR generally you want to avoid `&mut &mut | ||
//~| ERROR generally you want to avoid `&mut &mut | ||
//~| ERROR generally you want to avoid `&mut &mut | ||
//~| ERROR generally you want to avoid `&mut &mut |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need so many warnings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR fixes an actual annoying bug with for _ in &mut bar
but in this case also duplicates some errors. On the other hand &mut &mut &mut
is such a corner case I did not think it would be worth it to try to deduplicate errors here.
The OTOH, with the new error formatting we probably don't need to care. |
|
It doesn't need any `hir` feature and `ast` is much more stable.
Rebased and removed 472e7ca. Is it so bad that it reports duplicated commits on such convoluted example? |
I can fix it later. |
Fix #939.