Does pinning T imply all U's in T are also pinned?

Feel free to look at this post and the discussion that follows: When is it safe to move a member value out of a pinned future? - #3 by Yandros

Similar to ::pin-project there is the ::easy-pin crate, which is still WIP as I want to make it not require any unsafe while guarding against bad usages, so that users will get compiler errors instead of unsound code (e.g., prevent a user offering a pin-projection to a generic field from implementing Unpin on the struct without guarding that the type of that field is also Unpin)

  • (There are still no docs given the alpha stage, but you can have a look at the examples)

In particular, it offers a PinSensitive wrapper, which I find more useful than stdlib's PhantomPinned

1 Like