Using an unsized value from slicing incorrectly should give a more helpful error message #20848
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
WG-diagnostics
Working group: Diagnostics
The fix is to write
let x = &y[1..2];
but it's not the first thing that springs to mind given that error message, especially for a beginner.cc #20783
The text was updated successfully, but these errors were encountered: