NLL: missing suggestions to "consider using a reference instead" #51187
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
NLL-diagnostics
Working towards the "diagnostic parity" goal
AST borrowck suggests using a reference when you try to move something that cannot be moved (e.g. out of an array, or out of borrowed content, or out of a struct that implements
Drop
).NLL fails to provide this suggestion; it just issues an error.
Here are the test cases where pnkfelix has noted this:
The text was updated successfully, but these errors were encountered: