Closed as duplicate of#88013
Description
We might look for a way to detect, and possibly remove, repeated trait bounds. Maybe as a lint? Or maybe this would be better in rustfmt
or clippy?
An example from #87880:
pub trait ControlFlowGraph:
DirectedGraph + WithStartNode + WithPredecessors + WithStartNode + WithSuccessors + WithNumNodes
I was surprised this is allowed!
pub trait DirectedGraph {}
pub trait WithStartNode {}
pub trait WithPredecessors {}
pub trait WithSuccessors {}
pub trait WithNumNodes {}
pub trait ControlFlowGraph:
DirectedGraph + WithStartNode + WithPredecessors + WithStartNode + WithSuccessors + WithNumNodes
{}