Skip to content

Warn on unused/unnecessary trait bounds #1463

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

Open
gsingh93 opened this issue Jan 22, 2017 · 1 comment
Open

Warn on unused/unnecessary trait bounds #1463

gsingh93 opened this issue Jan 22, 2017 · 1 comment

Comments

@gsingh93
Copy link

I sometimes overspecify the trait bounds on an impl by accident. In many cases, some of the bounds aren't actually needed. It would be nice to have a lint I could run to warn me whenever I've done this so I could clean it up.

There are cases when you want to overspecify the trait boundaries so you can add things to them without breaking backwards compatibility, but in these cases you'd just ignore the lint or turn it off.

@llogiq
Copy link
Contributor

llogiq commented Jan 22, 2017

We should tread lightly here. For example it's hard to know if e.g. marker traits are really needed. E.g. do we really need Ord or is PartialOrd sufficient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants