Skip to content

NLL: missing suggestions to "consider using a reference instead" #51187

Closed
@pnkfelix

Description

@pnkfelix

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:

Metadata

Metadata

Assignees

Labels

A-NLLArea: Non-lexical lifetimes (NLL)NLL-diagnosticsWorking towards the "diagnostic parity" goal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions