unused_variable: applying suggestion causes compiler error #104904
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
The current output is:
The problem is while the
if res {}
at the end is technically unreachable, it will still cause a compiler error if we auto-apply thelet res = ..
->let _res = ...
with cargo fix.Could we somehow make the "remove
if res {}
" suggestion apply automatically so that it is performed before theres
to_res
rename?The text was updated successfully, but these errors were encountered: