nomicon icon indicating copy to clipboard operation
nomicon copied to clipboard

Does pinning violate the wording in Constructors?

Open EvanCarroll opened this issue 4 years ago • 1 comments

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?

EvanCarroll avatar May 04 '21 03:05 EvanCarroll

bump

Pin could probably use its own chapter but it should at least be mentioned.

also, this paragraph occurs in Constructors, not Destructors

barrowsys avatar May 12 '22 19:05 barrowsys