Skip to content

More accurate suggestion for missing binop trait bounds #96442

Open
@estebank

Description

@estebank

#94034 (comment)

We currently emit

LL | impl<B: std::ops::Add> Add for D<B> {
   |       +++++++++++++++

but it should be

LL | impl<B: std::ops::Add<Output = B>> Add for D<B> {
   |       +++++++++++++++++++++++++++

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`D-papercutDiagnostics: An error or lint that needs small tweaks.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions