3 ms·
You have correctly identified it as FUD. People have a bone to pick with Pin, so they irrationally latch on to it, but the general problem is the fact that the
by kibwen 6y ago
You have correctly identified it as FUD. People have a bone to pick with Pin, so they irrationally latch on to it, but the general problem is the fact that the &mut invariants cannot currently permit any self-referential data, which is a useful concept in general (for intrusive data structures, etc) and whose lack that people have been hacking around since before 1.0, with crates like rental and owning_ref. The plan to fix this is to make self-referentiality a first-class concept in the language, as a principled exception to the usual &mut uniqueness invariant that preserves memory safety while properly encoding the aliasing guarantees.
- ameliaquining 6y agoSource? I would like this to be true, but I haven't actually seen it anywhere.
- steveklabnik 6y agohttps://news.ycombinator.com/item?id=26410487 https://news.ycombinator.com/item?id=26410487 (it's a significant part, though not the entirety, of this comment)
- kibwen 6y agoHere's Niko Matsakis' take: https://github.com/rust-lang/rust/issues/63818#issuecomment-526579977 https://github.com/rust-lang/rust/issues/63818#issuecomment-...
- dataangel 6y ago> The plan to fix this is to make self-referentiality a first-class concept in the language, as a principled exception to the usual &mut uniqueness invariant that preserves memory safety while properly encoding the aliasing guarantees. Are there issues I can subscribe to or RFCs for this?
- kibwen 6y agoYep, this one: https://github.com/rust-lang/rust/issues/63818 https://github.com/rust-lang/rust/issues/63818 (the comment I'm summarizing is https://github.com/rust-lang/rust/issues/63818#issuecomment-526579977 https://github.com/rust-lang/rust/issues/63818#issuecomment-... )