Skip to content

Commit f0511a2

Browse files
committed
place ops
1 parent 9c8bf98 commit f0511a2

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
@@ -182,13 +182,12 @@ requirement of 2.
182182
A *place* (called "lvalue" in C and "glvalue" in C++) is the result of computing a [*place expression*][place-value-expr].
183183
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).
184184
A place has a type, indicating the type of [values](#value) that it stores.
185-
Places cannot be "stored" in memory, only values can.
186185

187186
The key operations on a place are:
188-
* storing a [value](#value) of the same type in it (when it is used on the left-hand side of an assignment),
189-
* turning it into a [pointer value](#value) (when it is used inside `&expr`), which is also the only way to "store" a place,
190-
* and loading a [value](#value) of the same type from it (through the place-to-value coercion).
191-
187+
* Storing a [value](#value) of the same type in it (when it is used on the left-hand side of an assignment).
188+
* Loading a [value](#value) of the same type from it (through the place-to-value coercion).
189+
* 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.
190+
This is also the only way a place can be "stored": by converting it to a value first.
192191

193192
#### Value
194193

0 commit comments

Comments
 (0)