Skip to content

Compiler warning for where clause #58471

Closed
@xd009642

Description

@xd009642

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 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions