Mutate from multiple threads without interior mutability?

static mut is almost certainly not what you want because it trivially triggers UB by allowing a safe API to hand out multiple mutable borrows that live for 'static. I've written about this before: Mutable statics have scary superpowers! Do not use them

3 Likes