-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Wrong inferred type in while
and if
with block conditions
#11561
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
Comments
This regressed in #11375, which removed a bunch of code and a cov-mark around https://github.com/rust-analyzer/rust-analyzer/pull/11375/files#diff-29c34fde1addff90d60e0f941fff6fc91a02b5be6f0f8ed4a448d9a6fe6f1985L285. |
Ah, that is because condition is now an Similar thing I assume will happen for It's the same problem I have fixed for |
while
with block conditionwhile
and if
with block conditions
11565: fix: Fix body selection in while loops r=Veykril a=lnicola CC #11561 Co-authored-by: Laurențiu Nicola <[email protected]>
It's interesting as it's very hard to prevent this kind of issues ahead of time. Fixed syntax trees can do that, but in our current model things can break unexpectedly. CC #6584. |
The text was updated successfully, but these errors were encountered: