-
Notifications
You must be signed in to change notification settings - Fork 13.3k
failed to automatically apply fixes suggested by rustc
due to use of moved value
#103776
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
failed to automatically apply fixes suggested by rustc
due to use of moved value:
conn``failed to automatically apply fixes suggested by rustc
due to use of moved value:
conn`.
failed to automatically apply fixes suggested by rustc
due to use of moved value:
conn`.failed to automatically apply fixes suggested by rustc
due to use of moved value: conn
.
Do you mind sharing what the suggested fix actually was? It's hard to tell what was applied just from the bug here. |
Okay, |
FWIW, be aware that diagnostics don't always have enough information available to them to fully provide correct code, but we consider it appropriate if subsequent compilations provide enough guidance that you can eventually end up with correct code. Having said that, we absolutely appreciate reports of cases like these where we can preclude some of those iterations. Here, the type error suggestion can/should climb up from the current expression until it finds the binding creation and track whether any looping expression is in between them. If so, it should suggest both removing the |
I'm happy that my issue is helpful. I'm not a lang dev, but I think that compiler doesn't provide a context that this happens in the loop, just ignored this fact. |
#103908 will provide the following error after the first applied change:
|
failed to automatically apply fixes suggested by rustc
due to use of moved value: conn
.failed to automatically apply fixes suggested by rustc
due to use of moved value
Fixed: #103908. I close this issue, anyway I can reopen it due to appeared issues after this PR. |
I tried this code:
This block of code (43):
I expected to see this happen:
I used
cargo clippy --fix --allow-dirty
and everything fixes correct.Instead, this happened:
Meta
rustc --version --verbose
:Backtrace
// NO BACKTRACE IT JUST FALES TO FIX.
The text was updated successfully, but these errors were encountered: