Support returning elements from an array by-value #48174
Labels
A-array
Area: `[T; N]`
A-borrow-checker
Area: The borrow checker
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.
This works:
But this fails:
with a "cannot move out of" error.
(#rust-beginners advised me that this "should" intuitively work and that I should file here)
The text was updated successfully, but these errors were encountered: