Skip to content

Commit 48a3f5e

Browse files
committed
Go with 'memory location' over 'place'
1 parent 7aac840 commit 48a3f5e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/expressions/array-expr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ greater than 1 then this requires that the type of `a` is
3838
3939
[Array and slice](types.html#array-and-slice-types)-typed expressions can be
4040
indexed by writing a square-bracket-enclosed expression (the index) after them.
41-
When the array is mutable, the resulting [place] can be assigned to.
41+
When the array is mutable, the resulting [memory location] can be assigned to.
4242
For other types an index expression `a[b]` is equivalent to
4343
`*std::ops::Index::index(&a, b)`, or `*std::opsIndexMut::index_mut(&mut a, b)`
4444
in a mutable place expression context. Just as with methods, Rust will also
@@ -69,7 +69,7 @@ The array index expression can be implemented for types other than arrays and sl
6969
by implementing the [Index] and [IndexMut] traits.
7070

7171
[_Expression_]: expressions.html
72-
[place]: expressions.html#place-expressions-and-value-expressions
72+
[memory location]: expressions.html#place-expressions-and-value-expressions
7373
[Index]: ../std/ops/trait.Index.html
7474
[IndexMut]: ../std/ops/trait.IndexMut.html
7575
[constant expression]: expressions.html#constant-expressions

src/expressions/match-expr.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ the pattern are assigned to local variables in the arm's block, and control
1818
enters the block.
1919

2020
When the head expression is a [place expression], the match does not allocate a
21-
temporary location; however, a by-value binding may copy or move from the place.
21+
temporary location; however, a by-value binding may copy or move from the
22+
memory location.
2223
When possible, it is preferable to match on place expressions, as the lifetime
2324
of these matches inherits the lifetime of the place expression rather than being
2425
restricted to the inside of the match.

src/expressions/operator-expr.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ assert_eq!(y, 20);
4040

4141
The `&` (shared borrow) and `&mut` (mutable borrow) operators are unary prefix
4242
operators. When applied to a [place expression], this expressions produces a
43-
reference (pointer) to the location that the value refers to. The place is also
44-
placed into a borrowed state for the duration of the reference. For a shared
45-
borrow (`&`), this implies that the place may not be mutated, but it may be read
46-
or shared again. For a mutable borrow (`&mut`), the place may not be accessed in
47-
any way until the borrow expires. `&mut` evaluates its operand in a mutable
48-
place expression context. If the `&` or `&mut` operators are applied to a [value
49-
expression], then a temporary value is created; the lifetime of this temporary
50-
value is defined by [syntactic rules].
43+
reference (pointer) to the location that the value refers to. The memory
44+
location is also placed into a borrowed state for the duration of the reference.
45+
For a shared borrow (`&`), this implies that the place may not be mutated, but
46+
it may be read or shared again. For a mutable borrow (`&mut`), the place may not
47+
be accessed in any way until the borrow expires. `&mut` evaluates its operand in
48+
a mutable place expression context. If the `&` or `&mut` operators are applied
49+
to a [value expression], then a [temporary value] is created.
5150

5251
These operators cannot be overloaded.
5352

@@ -70,8 +69,8 @@ The `*` (dereference) operator is also a unary prefix operator. When applied to
7069
a [pointer](types.html#pointer-types) it denotes the pointed-to location. If
7170
the expression is of type `&mut T` and `*mut T`, and is either a local
7271
variable, a (nested) field of a local variance or is a mutable [place
73-
expression], then the resulting place can be assigned to. Dereferencing a raw
74-
pointer requires `unsafe`.
72+
expression], then the resulting memory location can be assigned to.
73+
Dereferencing a raw pointer requires `unsafe`.
7574

7675
On non-pointer types `*x` is equivalent to `*std::ops::Deref::deref(&x)` in an
7776
[immutable place expression context](expressions.html#mutability) and
@@ -336,7 +335,7 @@ assert_eq!(x, 14);
336335

337336
[place expression]: expressions.html#place-expressions-and-value-expressions
338337
[value expression]: expressions.html#place-expressions-and-value-expressions
339-
[syntactic rules]: expressions.html#temporary-lifetimes
338+
[temporary value]: expressions.html#temporary-lifetimes
340339
[float-int]: https://github.com/rust-lang/rust/issues/10184
341340
[float-float]: https://github.com/rust-lang/rust/issues/15536
342341
[`unit` type]: types.html#tuple-types

0 commit comments

Comments
 (0)