-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add needless_late_init
lint
#7995
Conversation
r? @giraffate (rust-highfive has picked a reviewer for you, use r? to override) |
tests/ui/let_if_seq.stderr
Outdated
| | ||
LL | }; | ||
| + | ||
|
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.
This overlaps a little with useless_let_if_seq
, needless_late_init
doesn't do as many clever transformations as useless_let_if_seq
however, hopefully meaning it has less false positives
I wasn't sure what to choose here, I could remove the matching of ifs from needless_late_init
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.
This overlaps a little with
useless_let_if_seq
, needless_late_init doesn't do as many clever transformations asuseless_let_if_seq
however, hopefully meaning it has less false positives
Yes, it looks good.
I wasn't sure what to choose here, I could remove the matching of ifs from
needless_late_init
IMO it looks good as it is.
| | ||
LL ~ 1 => "one", | ||
LL | _ => { | ||
LL ~ "two" |
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.
Another problem I had was with mutlispan_suggest, the suggestions are a little bare and using _verbose doesn't seem to change it. As well as running into rust-lang/rustfix#141
Is there a way to have a regular suggestion appear just without the help label repeated?
☔ The latest upstream changes (presumably #7977) made this pull request unmergeable. Please resolve the merge conflicts. |
11a23cb
to
633259d
Compare
☔ The latest upstream changes (presumably #8007) made this pull request unmergeable. Please resolve the merge conflicts. |
633259d
to
3957244
Compare
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.
Overall looks good, thanks! I made some small comments.
4652057
to
d346ec9
Compare
Thanks, made the changes |
@bors r+ Thanks! |
📌 Commit d346ec9 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
examples:
changelog: Add [
needless_late_init
]