← Back to context

Comment by yccs27

14 hours ago

There's a different proposal by @withoutboats to make immovability a property of the place/reference instead of the type:

https://without.boats/blog/pinned-places/

Does this project goal mean that the rust maintainers have decided to implement @yoshuawuyts' immovable types proposal in favor of pinned places?

    > # How does this relate to the "pin ergonomics" initiative?
    > This work is an alternative to Project Goal 2025H2: Continue Experimentation with Pin Ergonomics, which includes the following extensions: 

    > A new item family pin in lvalues, e.g. &pin x, &pin mut x, &pin const x.
    > A one-off overload of Rust's Drop trait, e.g. fn drop(&pin mut self).
    > A new item kind pin in patterns, e.g. &pin <pat>.

    > Notably, this work does not solve pin's duplicate definition problem, meaning that even with these extentions we still end up with Trait and PinnedTrait variants of existing traits. The Drop trait being the exception to this, since the initiative is proposing to special-case it using a one-off overload.

https://github.com/rust-lang/rust-project-goals/blob/main/sr...

  • Ah, thanks, I didn't realize "pin ergonomics" was the Rust Project name for @withoutboats' pinned places.