Misleading suggestion for builders #91525
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.
When trying to return
Self
instead ofself
from a method with aself
ormut self
parameter the suggestion is most likely misleading. I expected the compiler to tell me to changeSelf
toself
because in my eyes its more likely that the user wants to return the same instance that they took instead of allocating a new one but instead i get this:here is a reproducer:
here is the expected output:
The text was updated successfully, but these errors were encountered: