Skip to content

Commit ffb3e51

Browse files
bors-ferrocene[bot]Jonas Schievink
andauthored
Merge #327
327: Remove the term "value holder" r=kirtchev-adacore a=jonas-schievink Part of #178 (not yet sure what to do about "owner") Since only local variables participate in initialization tracking, and ownership, but the term *value holder* includes consts and statics, the term is incorrect here. This is still inaccurate, since borrows and initialization is tracked on a per-field basis in some cases, but already an improvement. Co-authored-by: Jonas Schievink <[email protected]>
2 parents dd9e605 + 9b726d3 commit ffb3e51

File tree

2 files changed

+10
-23
lines changed

2 files changed

+10
-23
lines changed

src/glossary.rst

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4411,7 +4411,7 @@ owner
44114411
^^^^^
44124412

44134413
:dp:`fls_7vwwhberexeb`
4414-
An :dt:`owner` is a :t:`value holder` that holds a :t:`value`.
4414+
An :dt:`owner` is a :t:`variable` that holds a :t:`value`.
44154415

44164416
.. _fls_1gmetz8qtr0l:
44174417

@@ -7040,15 +7040,6 @@ value expression context
70407040
A :dt:`value expression context` is an expression context that is not a
70417041
:t:`place expression context`.
70427042

7043-
.. _fls_aP9ZaU01Dsg5:
7044-
7045-
value holder
7046-
^^^^^^^^^^^^
7047-
7048-
:dp:`fls_RssUVCMKCNBx`
7049-
A :dt:`value holder` is either a :t:`constant`, a :t:`static`, or a
7050-
:t:`variable`.
7051-
70527043
.. _fls_a5xof9jlpc2e:
70537044

70547045
value operand

src/ownership-and-deconstruction.rst

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Ownership
2020
management model of Rust.
2121

2222
:dp:`fls_ckcnkbb6y3cq`
23-
An :t:`owner` is a :t:`value holder` that holds a :t:`value`.
23+
An :t:`owner` is a :t:`variable` that holds a :t:`value`.
2424

2525
:dp:`fls_ze0u9gfylmhn`
2626
A :t:`value` shall have only one :t:`owner`.
@@ -32,25 +32,21 @@ Initialization
3232

3333
.. rubric:: Legality Rules
3434

35-
:dp:`fls_3QyMS128AUOr`
36-
A :t:`value holder` is either a :t:`constant`, a :t:`static`, or a
37-
:t:`variable`.
38-
3935
:dp:`fls_drfzu02bo7oe`
4036
:t:`Initialization` is the act of supplying an initial :t:`value` to a
41-
:t:`value holder`.
37+
:t:`variable`.
4238

4339
:dp:`fls_wnhci8phdu4m`
44-
When a :t:`value holder` holds a :t:`value`, the :t:`value holder` is
45-
considered to be :dt:`initialized`.
40+
When a :t:`variable` holds a :t:`value`, the :t:`variable` is considered to be
41+
:dt:`initialized`.
4642

4743
:dp:`fls_ch2lvm50olqd`
48-
When a :t:`value holder` lacks a :t:`value` or its :t:`value` has been
49-
transferred :t:`by move`, the :t:`value holder` is considered to be
44+
When a :t:`variable` lacks a :t:`value` or its :t:`value` has been
45+
transferred :t:`by move`, the :t:`variable` is considered to be
5046
:dt:`uninitialized`.
5147

5248
:dp:`fls_46910buiwvv9`
53-
A :t:`value holder` shall be :t:`initialized` before it is accessed.
49+
A :t:`variable` shall be :t:`initialized` before it is accessed.
5450

5551
.. rubric:: Runtime Semantics
5652

@@ -432,12 +428,12 @@ A :t:`destructor` is a :t:`function` that is invoked immediately before the
432428
related :t:`type`. Such an object is said to be :dt:`dropped`.
433429

434430
:dp:`fls_gfvm70iqu1l4`
435-
An :t:`uninitialized` :t:`value holder` is not :t:`dropped`.
431+
An :t:`uninitialized` :t:`variable` is not :t:`dropped`.
436432

437433
.. rubric:: Dynamic Semantics
438434

439435
:dp:`fls_l2xkdjeydqtx`
440-
:t:`Dropping` an :t:`initialized` :t:`value holder` proceeds as follows:
436+
:t:`Dropping` an :t:`initialized` :t:`variable` proceeds as follows:
441437

442438
#. :dp:`fls_bync24y6gp93`
443439
If the :t:`drop type` implements the :std:`core::ops::Drop` :t:`trait`, then

0 commit comments

Comments
 (0)