type_repetition_in_bounds should not trigger on macro-generated code #4326
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-false-positive
Issue: The lint was triggered on code it shouldn't have
T-macros
Type: Issues with macros and macro expansion
See an example from Serde in serde-rs/serde#1595.
I consider this a false positive because in code generators we optimize for readability of the macro code, not readability of the code that gets generated.
As a simple example, a macro might want to add a where-clause:
It wouldn't make sense here to have extra logic to detect whether the where-clause in the macro input happens to already have some bounds on the same type parameter and if so then insert bounds into the same predicate, otherwise add a new predicate.
Mentioning @xd009642, @oli-obk, @flip1995 from #3766.
The text was updated successfully, but these errors were encountered: