Force a value to be dropped at some point

I was having a hard time reasoning about when drop should run for this non-move closure; so I had to try it in the playground to convince myself that it works. In hindsight, it's clear that x and y must be moved into the closure anyway since the closure moves them into the return value. IMO, I'm more inclined to put an explicit move to make that obvious to avoid a double-take by future me.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.