-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: Don't show duplicated adjustment hints for blocks, ifs and matches #13749
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: Don't show duplicated adjustment hints for blocks, ifs and matches #13749
Conversation
0510d81
to
7c9a85b
Compare
Thanks! |
☀️ Test successful - checks-actions |
Why are these coercions duplicated during type checking in the first place? To me that seems to be the better place to fix this. |
Thinking about this a bit, I don't think they are duplicating actually? The reborrows happen on every "pass" between blocks/expressions (which I believe matches rustc's behaviour, but would need to double check). Though the hints on the else block are obviously wrong, due to how we handle those block constructs. |
I don't think there is a meaningful difference between
They all result in the same " |
For example in case of reborrows specifically I'm pretty sure |
fix: Only skip adjustment hints for block, if and match expressions for reborrows cc #13749
Before:


After:
I want to improve adjustment hints, this is the first step :)