Skip to content

Improve documentation of needless_range_loop #12701

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

Closed
wants to merge 3 commits into from

Conversation

tatounee
Copy link

fixes #6930 6930

Add a note telling the user that the suggestions might remove (maybe expected) iterations in for loop.

changelog: [needless_range_loop]: Improve documentation

@rustbot
Copy link
Collaborator

rustbot commented Apr 21, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dswij (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 21, 2024
@blyxyas
Copy link
Member

blyxyas commented Apr 21, 2024

r? blyxyas

@rustbot rustbot assigned blyxyas and unassigned dswij Apr 21, 2024
@@ -61,6 +61,7 @@ error: the loop variable `i` is only used to index `vec2`
LL | for i in 0..vec.len() {
| ^^^^^^^^^^^^
|
= note: suggestion might skip expected iterations if `vec2.iter().count()` is less than `vec.len()`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the suggestion skips some iteration, then that means it's a change in behavior. Wouldn't it be a bad suggestion issue and should be labeled as such?

@xFrednet
Copy link
Member

Hey @tatounee, this is a ping from triage, since there hasn't been any activity in some time. Are you still planning to continue this implementation?

If you have any questions, you're always welcome to ask them in this PR or on Zulip.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 30, 2024
@xFrednet
Copy link
Member

Hey this is triage, I'm closing this due to inactivity. If you want to continue this implementation, you're welcome to create a new PR. Thank you for the time, you already put into this!

Interested parties are welcome to pick this implementation up as well :)

@rustbot label +S-inactive-closed -S-waiting-on-author -S-waiting-on-review

@rustbot rustbot added S-inactive-closed Status: Closed due to inactivity and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jul 23, 2024
@xFrednet xFrednet closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive-closed Status: Closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

needless_range_loop produces code with different behaviour
5 participants