4 ms·
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 &m
by nyanpasu64 5y ago
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?
- zozbot234 5y agoYou can have multiple *mut T aliasing to the same data, but if you mutate through them you're on your own wrt. Rust's safety rules.