Can Pin>> violate the pin gurantee?
⚓ Rust 📅 2025-05-03 👤 surdeus 👁️ 9Since RefCell<T> allows for interior mutability, then obtaining a mut &T using RefCell::borrow_mut(), we can do a move via mem::replace(), and that too in (apparently) safe code; whereas documentation for Pin<T> states, that it isn't possible for safe code to obtain a reference to &mut T.
Intutively, it appears that it violates the pin gurantee; or, am I wrong here?
2 posts - 2 participants
🏷️ rust_feed