Only a single error is emitted for multiple equal unmet bounds arising from distinct generic parameters on the same item #115288
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uplifted from #105306 (comment) & #105306 (comment).
CC @estebank
For the following erroneous code, rustc only emits a single error while ideally it should emit two errors. Presumably, this happens because the two predicate obligations for
String: Copy
have the same cause span (namely of the entire path) before any fulfillment error adjustment takes place and therefore they get deduplicated early on. Details may vary.Original reproducer (involving projections):
Current output (1 error):
Expected output (2 errors):
Another very similar reproducer (involving ADTs) which probably takes a slightly different execution path in the compiler:
Meta
rustc -Vv
@rustbot label T-compiler A-diagnostics D-incorrect
The text was updated successfully, but these errors were encountered: