Error refers to the wrong span of code #90321
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
The error reported by rust nightly/beta is:
Playground
But the error clearly doesn't belong there - it's supposed to be on line 14. Rust stable shows the correct error, and re-assigning to
foo
just before the shuffle makes the correct error show on nightly and beta as well.This is what the error should be:
The text was updated successfully, but these errors were encountered: