Scope pinning `&mut T`

I agree, it looks sound and the underlying idea is interesting (it's a very similar reasoning to the one used by Pin::set!)

However I believe this is unfortunately rather useless given it can be implemented using safe code and other primitives:

pub fn scope_pin<T, R, F>(place: &mut T, replacement: T, f: F) -> R
where
    F: FnOnce(Pin<&mut T>) -> R,
{
    f(pin!(std::mem::replace(place, replacement)))
}