vicious "add &
" then "remove &
" cycle of suggestions
#102892
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 (playground):
The current output is:
To be clear, both of the above are fine suggestions.
Here's the problem:
When you make the suggested change on the second version (the one with the type annotation in the interior of the code):
The current output is:
Ideally the output should look like:
(Really, for types where the right-hand side won't be able to be moved into the left-hand side, it would be better to not suggest adding the
&
at all. But my immediate goal is to at least include the alternative suggestion.)The text was updated successfully, but these errors were encountered: