Skip to content

Commit

Permalink
Rollup merge of rust-lang#65505 - RalfJung:rc, r=Centril
Browse files Browse the repository at this point in the history
Rc: value -> allocation

See rust-lang#64484. This does not yet edit `Arc` as I first wanted to be sure we agree on the terminology the way it actually ends up. "value" as a term appears a lot in this file, and sometimes it refers to the value stored inside the `RcBox` while sometimes it refers to the `RcBox` itself. I tried to properly tease these apart but may have made some mistakes. The former should now always be called "inner value" and the latter "allocation".

One area where I was very unsure of which terminology is dropping: the `value` field of the `RcBox` will get dropped *earlier* than the `RcBox` itself if there are weak references. I decided that "dropping the value stored in the allocation" refers to dropping the value field, while "destroying the allocation" refers to actually freeing its backing memory.

r? @Centril
  • Loading branch information
Centril authored Oct 19, 2019
2 parents 5532699 + 1b38463 commit 2de4f43
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 110 deletions.
Loading

0 comments on commit 2de4f43

Please sign in to comment.