2 ms·
> Rust has limited options to opt into shared mutability The idiomatic Rust equivalent of a C non-restrict pointer is arguably &Cell<T>. The biggest problem w
by zozbot234 1y ago
> Rust has limited options to opt into shared mutability
The idiomatic Rust equivalent of a C non-restrict pointer is arguably &Cell<T>. The biggest problem with it is library code that takes &mut T when the likes of &Cell<T> might suffice (because potential aliasing does not affect the semantics of what that Rust code is doing), but this is an acknowledged problem and the Rust project will take pull req's that fix it where it occurs.