Misplaced span for the error "does not live long enough" #39268
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
WG-diagnostics
Working group: Diagnostics
Playground
Code:
Compiler's output:
Look at
--> <anon>:6:5
.It points to the
}
,but I expected it to point to the
y
.Look at
| ^
ydropped here while still borrowed
.It is treated as a primary span,
but I expected
| - borrow occurs here
to be treated as a primary span.It is bad for editors, i.e., VSCode.
The text was updated successfully, but these errors were encountered: