Skip to content

[[infinite_loop] fix infinite loop false positive #15157

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

odysa
Copy link
Contributor

@odysa odysa commented Jun 27, 2025

changelog: [infinite_loop]: Improve handling of infinite loops in async blocks

Fix #14000

This PR refines the [infinite_loop] lint to avoid false positives when infinite loops occur inside async blocks that are not awaited (such as those that are spawned or assigned to variables for later use). The lint will now only trigger when the async block containing the loop is directly awaited.

@odysa odysa force-pushed the fix/inf-loop-err branch 3 times, most recently from a90bcc0 to c6af9da Compare June 28, 2025 02:19
@odysa odysa force-pushed the fix/inf-loop-err branch from c6af9da to 5e3812b Compare June 28, 2025 02:22
@odysa odysa changed the title fix infinite loop [[infinite_loop] fix infinite loop false positive Jul 12, 2025
@odysa odysa marked this pull request as ready for review July 12, 2025 15:18
@rustbot
Copy link
Collaborator

rustbot commented Jul 12, 2025

r? @dswij

rustbot has assigned @dswij.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive for infinite_loop inside async block in function
3 participants