-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Make the unconditional_recursion
lint work across function calls
#57965
Comments
@rustbot claim Will take a few weeks though. edit: while I am still interested in this, I don't have the experience and time to implement this at the moment. In case someone else is motivated and wants to fix this, go ahead. |
@rustbot claim Given how many people run into this, this really needs to be fixed. I'll take another look soon. |
What is the status of this issue? |
see #75067, it needs to be reimplemented in a way that does not regress performance as much |
Make `unconditional_recursion` warning detect recursive drops Closes rust-lang#55388 Also closes rust-lang#50049 unless we want to keep it for the second example which this PR does not solve, but I think it is better to track that work in rust-lang#57965. r? `@oli-obk` since you are the mentor for rust-lang#55388 Unresolved questions: - [x] There are two false positives that must be fixed before merging (see diff). I suspect the best way to solve them is to perform analysis after drop elaboration instead of before, as now, but I have not explored that any further yet. Could that be an option? **Answer:** Yes, that solved the problem. `@rustbot` label +T-compiler +C-enhancement +A-lint
The lint for unconditional recursion currently only handles the case where a function calls itself directly, which means that many useful cases are missed:
I've talked to @eddyb about this and it seems like they've come up with a workable solution that might also benefit other MIR passes:
IRC log
The text was updated successfully, but these errors were encountered: