Re:The Hare programming language
by zozbot234 on Monday April 25, 2022 @06:02AM
(#31152460)
These are different things. UnsafeCell<T> is for shared mutable data. *mut T is for data that you assert will never be mutated while it's being shared with some other reference, but you can't rely on the compiler to prove this fact for you.
[ Parent
| on HN ]
Re:The Hare programming language
by nyanpasu64 on Monday April 25, 2022 @06:16AM
(#31152565)
If I have a &mut T, what pointer type do I convert it into (and create multiple copies of), to allow shared mutation scoped within the lifetime of the source &mut T?