unused_associated_type_bounds are usable and useful #125560
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
<dyn AssocOptOut as AssocOutput>::Foo
is not defined and cannot be used in any way.However, the specified associated type can still be used, as demonstrated by the blanket implementation for
Box<dyn AssocType<Foo = T>>
.Moreover, it is useful, as now
Box<dyn AssocOptOut<Foo = String>>
implementsAssocOptOut
, for example.(So ideally the warning could be renamed. Or if enough use-cases emerge, made
allow
or change in scope.)Other cases
No response
Rust Version
Playground, all channels.
Anything else?
The lint was introduced in #112319.
The text was updated successfully, but these errors were encountered: