-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Duplicate error messages when RPIT comes from function whose generics don't satisfy bounds #128756
Copy link
Copy link
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
I tried this code:
I expected to see this happen:
The error to be reported on the call to
foo()only:Instead, this happened:
The error is propagated to the use of the
println!macro call, without supposingxto implementDisplay:Version it worked on
It most recently worked on: Rust 1.77
Version with regression
rustc --version --verbose:Backtrace
Backtrace