Skip to content

NLL diagnostics span RHS of assignment when LHS was prior (and better?) choice #51217

Closed
@pnkfelix

Description

@pnkfelix

Consider the output diagnostics from

LL | let x = 42;
| -- first assignment to `x`

and compare them to

LL | let x = 42;
| - first assignment to `x`

I don't know why NLL deviates.

(Maybe its fine to switch to the right-hand side, but I want to make sure we do so as a deliberate choice, not an accident.)

Metadata

Metadata

Assignees

Labels

A-NLLArea: Non-lexical lifetimes (NLL)C-enhancementCategory: An issue proposing an enhancement or a PR with one.NLL-diagnosticsWorking towards the "diagnostic parity" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions