Unboxed closures: ref
-prefixed closures still capture by value
#16814
Labels
A-closures
Area: Closures (`|…| { … }`)
ref
-prefixed closures still capture by value
#16814
This code:
Erroneously prints
This piece of code, which I though should be exact equivalent to the former one, works correctly, however:
It prints
Looks like it copies
Cell
into the closure instead of taking it by reference.Original question is on Stackoverflow
The text was updated successfully, but these errors were encountered: