Extend call_with_explicit_closure
to block that returns a closure
#4026
Labels
call_with_explicit_closure
to block that returns a closure
#4026
Feature Request
Now this would compile
while this would not
Implement Suggestion
Shall we extend
call_with_explicit_closure
to work with a block which last expr is an explicit closure?Since there's no "clone" closure in rust, it seems to be very common that we'd like to clone something before move (like
Rc
,Arc
,SmolStr
, etc.). not everything here is signal thatCopy
.Now I have to
See also
https://users.rust-lang.org/t/clone-when-moving-into-a-closure/82680
https://internals.rust-lang.org/t/feature-request-add-clone-closure/15484/2
The text was updated successfully, but these errors were encountered: