Duplicate error messages when RPIT comes from function whose generics don't satisfy bounds #128756
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
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 supposingx
to implementDisplay
:Version it worked on
It most recently worked on: Rust 1.77
Version with regression
rustc --version --verbose
:Backtrace
Backtrace
The text was updated successfully, but these errors were encountered: