This works exactly as documented for Copy types, which have copy instead of move semantics:
(Basically the first examples are equivalent to yours, minus the explicit drop)
This works exactly as documented for Copy types, which have copy instead of move semantics:
(Basically the first examples are equivalent to yours, minus the explicit drop)