Variable appears to be borrowed by itself with NLL #48001
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-NLL
Area: Non-lexical lifetimes (NLL)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
NLL-complete
Working towards the "valid code works" goal
Milestone
Compiling this code snippet:
gives the following error:
After the
*other = ...
assignment, it appears to be impossible to interact withother
in any way, including moving and borrowing it. Effectively, it appears to be borrowed by itself.The text was updated successfully, but these errors were encountered: