-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
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 (
|
r? blyxyas |
@@ -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()` |
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.
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?
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 |
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