Closed
Description
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:
- ui/E0508.ast.nll.stderr; compare with E0508.ast.stderr
- ui/error-codes/E0509.nll.stderr; compare with E0509.stderr
- ui/issue-40402-ref-hints/issue-40402-1.nll.stderr; compare with issue-40402-1.stderr