nomicon
nomicon copied to clipboard
Does pinning violate the wording in Constructors?
The book says,
Move constructors are meaningless in Rust because we don't enable types to "care" about their location in memory. Every type must be ready for it to be blindly memcopied to somewhere else in memory. This means pure on-the-stack-but- still-movable intrusive linked lists are simply not happening in Rust (safely).
I'm new, but I'm not sure that's correct. Isn't that precisely what pin does?
bump
Pin could probably use its own chapter but it should at least be mentioned.
also, this paragraph occurs in Constructors, not Destructors