type_repetition_in_bounds should pay attention to msrv when ?Sized bound is involved #8772
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Lint Name
type_repetition_in_bounds
Reproducer
Clippy prefers I guess one of the following signatures instead:
The first one is great on modern compilers, but is a parse error on Rust 1.14 and older. Meanwhile, the second is not an improvement in my opinion. The bounds next to a type parameter (as opposed to in a where-clause) are only meant to be used for small/simple bounds.
I believe clippy should not trigger type_repetition_in_bounds if the msrv is declared as 1.14.0 or older and the type parameter has a single bound of
?Sized
, with all the rest of the bounds being in the where-clause.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: