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
feat: Add "Bind unused parameter" assist #15524
Conversation
874af3b
to
19e9994
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have this as a diagnostic quickfix oncew e have a diagnostic for unused vars
AssistKind::Refactor kind; I belive it's worth to have the same (or change both to QuickFix)
|
Yes, that one I'd say should also ideally be a diagnostic quickfix, but that's a different issue not relevant to this right now |
Just realized that this assist is different from 'remove_unused_param' one and can work for trait impl methods too. So, rollbacked all refactorings in |
@bors r+ |
☀️ Test successful - checks-actions |
This PR introduces a new Bind unused parameter assistant.
While we do have a QuickFix from
rustc
(prefixing the parameter with an underscore), it's sometimes more convenient to suppress the warning using the following approach:->