Skip to content

Commit dfbabc7

Browse files
committed
place ops
1 parent 78cad03 commit dfbabc7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: reference/src/glossary.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,12 @@ requirement of 2.
143143
A *place* (called "lvalue" in C and "glvalue" in C++) is the result of computing a [*place expression*][place-value-expr].
144144
A place is basically a pointer (pointing to some location in memory, potentially carrying [provenance](#pointer-provenance)), but might contain more information such as size or alignment (the details will have to be determined as the Rust Abstract Machine gets specified more precisely).
145145
A place has a type, indicating the type of [values](#value) that it stores.
146-
Places cannot be "stored" in memory, only values can.
147146

148147
The key operations on a place are:
149-
* storing a [value](#value) of the same type in it (when it is used on the left-hand side of an assignment),
150-
* turning it into a [pointer value](#value) (when it is used inside `&expr`), which is also the only way to "store" a place,
151-
* and loading a [value](#value) of the same type from it (through the place-to-value coercion).
152-
148+
* Storing a [value](#value) of the same type in it (when it is used on the left-hand side of an assignment).
149+
* Loading a [value](#value) of the same type from it (through the place-to-value coercion).
150+
* Converting between a place (of type `T`) and a pointer value (of type `&T`, `&mut T`, `*const T` or `*mut T`) using the `&` and `*` operators.
151+
This is also the only way a place can be "stored": by converting it to a value first.
153152

154153
#### Value
155154

0 commit comments

Comments
 (0)