new_without_default
does not include generic bounds in suggestions
#11267
Labels
C-bug
Category: Clippy is not doing the correct thing
Summary
new_without_default
suggests the implementation of the Default trait on generics without the specified trait bounds. This leads to the suggested change not compiling.Playground example
Reproducer
I tried this code:
I expected to see this happen:
Either no warning, or
Instead, this happened:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: