-
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
Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body #4730
Conversation
Next I will try to break this lint into 2 as suggested in #4648 (comment) |
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 didn't clean up, so don't worry about the mess right now. Please let me know if I am on the right path here. Thanks.
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 should be implemented as a Visitor. See comment above
45dc16f
to
2342e6e
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.
Does it look like you wanted to see?
Yes that's exactly what I wanted to see.
Do I understand correctly that we probably don't need to split into another lint any more now?
This PR is already a big improvement. But I'd rather still split the lint up in a correctness and a style lint.
BTW, I opened #4835 as I am hitting the same issue as Travis CI
I'll include this in #4825. Thanks for the report.
4265143
to
1cba0c9
Compare
@bors r+ rollup |
📌 Commit 1cba0c9 has been approved by |
…p1995 Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body changelog: Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body fixes rust-lang#4648
Rollup of 6 pull requests Successful merges: - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body) - #4764 (Allow casts from the result of `checked_abs` to unsigned) - #4766 (Fix false positive in derive_hash_xor_eq) - #4811 (Literal Representation Restructure) - #4820 (doc: fix the comment above the lint function) - #4830 (use more efficient code to generate repeated string) Failed merges: r? @ghost changelog: none
…p1995 Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body changelog: Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body fixes rust-lang#4648
Rollup of 5 pull requests Successful merges: - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body) - #4766 (Fix false positive in derive_hash_xor_eq) - #4811 (Literal Representation Restructure) - #4820 (doc: fix the comment above the lint function) - #4830 (use more efficient code to generate repeated string) Failed merges: r? @ghost
Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body changelog: Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body fixes #4648
@bors retry queue prio |
Rollup of 5 pull requests Successful merges: - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body) - #4766 (Fix false positive in derive_hash_xor_eq) - #4811 (Literal Representation Restructure) - #4820 (doc: fix the comment above the lint function) - #4830 (use more efficient code to generate repeated string) Failed merges: r? @ghost changelog: none
changelog: Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body
fixes #4648