rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

Add explicit_default_arguments lint

Open mrchilliballs opened this issue 1 month ago • 1 comments

The implementation is close to finished, all that is left is having it check a few more places (e.g. inside turbofish syntax in expressions), walk through types recursively, improve the lint message, and improve the tests. A refactor might be good as well. I'm opening this draft PR because I would like to get some feedback before finishing the lint completely. I would appreciate it if someone could take a look to see if everything is in order. The implementation is basically looking at the fully resolved type and checks the alias type and type alias to determine if an argument is unnecessary. EDIT: The recursive type walker is finished. Its only limitation is that it doesn't check bounds inside of traits in trait objects or impl types.


  • [X] Followed [lint naming conventions][lint_naming]
  • [ ] Added passing UI tests (including committed .stderr file)
  • [ ] cargo test passes locally
  • [ ] Executed cargo dev update_lints
  • [X] Added lint documentation
  • [ ] Run cargo dev fmt

fixes rust-lang/rust-clippy#14848

changelog: [`explicit_default_arguments`]: TODO

mrchilliballs avatar Nov 21 '25 01:11 mrchilliballs

:umbrella: The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Nov 21 '25 01:11 rustbot