-
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
Clippy hangs on .unwrap().unwrap() as usize
on nightly
#12506
Comments
Can't reproduce this on beta (currently 1.77.0-beta.9. The only commit since then is fc8f662 (This commit isn't in beta despite it being a few days ago, I think.) |
This can also be seen on the rust playground, where clippy works when set to "beta" but not "nightly". |
Oh yeah I know, this is an issue, I was saying that it's something new since beta (so that PR I think) |
Looks like it gets stuck in this loop This should probably reassign |
Fix infinite loop in `cast_sign_loss` when peeling unwrap method calls Fixes #12506 The lint wants to peel method calls but didn't actually reassign the expression, leading to an infinite loop. changelog: Fix infinite loop in [`cast_sign_loss`] when having two chained `.unwrap()` calls
Thanks! |
Summary
When running
cargo clippy
on a library with the following code using rust nightly, it hangs and never completes. The clippy process CPU usage is at 100% of a core while it's running.If anyone has a better title, please update it since I'm not sure exactly what's causing the bug.
Reproducer
It hangs with the output:
(I've waited 5 minutes, so I'm assuming it would hang forever.)
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: