r3-os/r3

Stop storing a reference in a lock guard

yvt opened this issue · 1 comments

yvt commented

rust-lang/rust#97027

pub struct MutexGuard<'a, T: ?Sized> {
data: &'a mut T,
locked: &'a AtomicBool,
}

yvt commented

The fix is ready, but I'm not quite sure how to describe the motivations for the change.