Surprising diagnostics for E0623 lifetime mismatch #97392
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: lifetime related
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f47c0f93783ccca97fa1a040ce78f668
The current output is:
I'm not sure what the ideal output for this, but here are some improvement points:
Record
lifetimeinfo.1
value, which is derived from amaps
value, but also at the keys ofmaps
?Another case where I got quite confused:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f50a36b183385f8247f688ca7dd5cb41
Which gave me the error:
Seems really weird to say that data from
t
is flowing intoself
in this case.The text was updated successfully, but these errors were encountered: