Closed
Description
In rust_miscdev, this would compile:
let mut state = SharedState::try_new()?;
let mut state2 = SharedState::try_new()?;
core::mem::swap(Arc::get_mut(&mut state).unwrap(), Arc::get_mut(&mut state2).unwrap());
but this swaps two pinned CondVar
, which is unsound. After pinning the CondVar
, we shouldn't be able to obtain any Arc<SharedState>
, but rather only Pin<Arc<SharedState>>
.