-
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
Extend explicit_iter_loop
and explicit_into_iter_loop
#10416
Conversation
r? @Manishearth (rustbot has picked a reviewer for you, use r? to override) |
171a5a8
to
cd21cf7
Compare
☔ The latest upstream changes (presumably #10350) made this pull request unmergeable. Please resolve the merge conflicts. |
cd21cf7
to
45a2958
Compare
ping @Manishearth |
0b24607
to
d107146
Compare
d107146
to
949712c
Compare
use rustc_span::symbol::sym; | ||
|
||
#[derive(Clone, Copy)] | ||
enum AdjustKind { |
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.
sugestion: would it be possible to make these adjustkind APIs generally useful in utils?
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.
I'm not sure how much can be pulled out. Every time I've had to handle adjustments there's always been some weird cases to handle. Something I'll keep in mind to do if it ever comes up.
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 lgtm, nice improvement
r=me whether or not you decide to move stuff into utils
@bors r=Manishearth |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes #1518
Some included cleanups
for_loop
test into different files for each lint (partially).into_iter
cases fromexplicit_into_iter
.changelog: Enhancement: [
explicit_iter_loop
]: Now also handles types that implementIntoIterator
.#10416
changelog: Sugg: [
explicit_into_iter_loop
]: The suggestion now works on mutable references.#10416