Unhelpful error message when multiple lifetimes have the same name #56423
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: Lifetimes / regions
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I was just looking for some lifetime errors for a project, and I came across the following example:
https://stackoverflow.com/questions/24847331/rust-lifetime-error-expected-concrete-lifetime-but-found-bound-lifetime
The solution in that thread is correct, but the error message is somewhat unhelpful with today's stable and nightly compilers:
Basically the problem is that there are two lifetimes called
'a
and the "expected" and "found" types use different'a
s.The text was updated successfully, but these errors were encountered: