15
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 26 Sep 2024
15 points (100.0% liked)
Rust Programming
8787 readers
1 users here now
founded 6 years ago
MODERATORS
This is a limitation of the current borrow checker. I think there are some efforts going on to improve on this situation, but right now that's what we have to work with.
The borrow checker can keep unnamed values around for a single expression, but not beyond that.