Comment by stymaar
15 hours ago
Great new! Since 2016 or so it became apparent that immovable types were a crucial missing part of Rust, but for a long time it was believed it wouldn't be possible to add them without breaking everything, which is why we ended up with the Pin hack.
I'm very glad they found a way to add it eventually, as it's really filling a glaring hole in the language.
> I'm very glad they found a way to add it eventually
Will this integrate with existing code that uses Pin<T>? If not this will split the ecosystem even further...
They recognize that there's going to have to be some kind of compatibility or migration story for existing APIs based on Pin, but have decided to punt that question to next year. For now, the focus is on the non-async-related use cases for these new language features (for which Pin is already insufficient); once those are known to work, then they'll shift focus to letting the async ecosystem benefit too.
I don't see why it may fail to integrate. Declare Pin as !Move and... thats all? I mean, there will be issues, edge-cases because it is just how these things happen, but still I don't see any fundamental issues with continuing to use Pin.
Like others said, Pin is incompatible with these semantics. Some people argue, though, that we need both (basically because pinned types can be moved before being pinned).
Pin applies to the pointer, !Move applies to the pointee.
9 replies →
Give it some time and see how people will use it and problems emerging. I do feel that this will stay.