Skip to content
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

Compiler warning for where clause #58471

Closed
xd009642 opened this issue Feb 14, 2019 · 3 comments
Closed

Compiler warning for where clause #58471

xd009642 opened this issue Feb 14, 2019 · 3 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`

Comments

@xd009642
Copy link
Contributor

My where clauses in traits recently had some unnecessary noise that the compiler could warn against:

What I was doing:

impl<T> SomeTrait<T> where T: Clone, T: Debug

What I should have been doing:

impl<T> SomeTrait<T> where T: Clone + Debug

I'd be happy to implement this myself if there's a consensus on adding this as a warning, though I may need some mentoring 👍

@estebank estebank added A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Feb 14, 2019
@estebank
Copy link
Contributor

These probably make more sense as clippy lints.

@xd009642
Copy link
Contributor Author

That makes sense, I've raised an issue on clippy as well rust-lang/rust-clippy#3764.

@Centril
Copy link
Contributor

Centril commented Feb 15, 2019

Closing in favor of the clippy issue.

@Centril Centril closed this as completed Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`
Projects
None yet
Development

No branches or pull requests

3 participants