Somewhat confusing lifetime error #79281
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: Lifetimes / regions
C-bug
Category: This is a bug.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This code (which comes from a rustup PR I'm working on -- rust-lang/rustup#2540) produces a somewhat confusing lifetime error:
Errors:
But isn't the "...but data from" error supposed to point to the code that returns data from
pattern
, not the return type annotation?The text was updated successfully, but these errors were encountered: