NLL: missing "consider using a let binding" message #49821
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
NLL-diagnostics
Working towards the "diagnostic parity" goal
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
(NB. This is assuming my in-progress branch)
If you run
issue-36082.rs
in NLL mode, you get:There is no suggestion about using a let binding to increase the lifetime of the temporary, unlike AST borrowck:
That said, this seems like a case where the AST borrowck message could also be improved. I doubt many people understand it very well.
The text was updated successfully, but these errors were encountered: