-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
unused_variables lint shouldn't warn for unused parameter to default method in trait #26487
Comments
After some discussion in the lang team meeting, our feeling was that we ought to not make this change: it's just a bit too special-cased and subtle, and to be consistent the rules ought to apply to other kinds of public functions as well. Instead, the recommended course is to add an #[allow] declaration to your trait or default method. |
I'd recommend That way you neither use |
The arguments to default methods in traits form part of the documentation, but it is not uncommon for a default implementation of a method to be a no-op that uses none of its arguments.
The text was updated successfully, but these errors were encountered: