Uh oh!
There was an error while loading. Please reload this page.
New ownership guide - #17138
Conversation
steveklabnik
commented
Sep 10, 2014
I also only deprecated the old one 😉 ❤️ @huonw |
Manishearth
commented
Sep 10, 2014
Yay! I'll read through the whole thing when I get time. Couple of things:
|
steveklabnik
commented
Sep 10, 2014
@Manishearth move semantics aren't exactly the same thing as ownership. |
Manishearth
commented
Sep 10, 2014
Hm, agreed, but I found them closely related. While learning Rust at first I didn't realize the difference between move/copy values and thus confused myself a lot. It took me a while to consolidate |
huonw
commented
Sep 11, 2014
Ownership implies move semantics, and values moving are one of the major ways people hit ownership... they're intimately linked. (e.g. taking a |
24f0d34 to
941ca29CompareThere was a problem hiding this comment.
That sounds like what lives in the heap is a Box<int>. But that's not true. In your case x living on the stack would be a Box<int>, a handle you can use to reach the heap-allocated int.
This is the start of the new "Ownership" guide, to replace the lifetimes guide.
I'm still working on it, but I wanted to share my progress, as this guide is very important, and I'd like as many eyes on it as possible. 😄