diagnostic refers to the wrong object's lifetime #126565
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
the lifetime of
s
isn't the problem - it's the implicit temporaryRef
object that does not live long enoughOther cases
No response
Rust Version
Anything else?
thanks to @Dirbaio for both figuring out the actual problem and suggesting the improved diagnostic!
The text was updated successfully, but these errors were encountered: