Skip to content

Commit 596c577

Browse files
authored
Modify mutable deref rule for &mut T
1 parent dda31c8 commit 596c577

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ The following expressions can be mutable place expression contexts:
241241
* [Temporary values].
242242
* [Fields][field]: this evaluates the subexpression in a mutable place expression context.
243243
* [Dereferences][deref] of a `*mut T` pointer.
244-
* Dereference of a variable, or field of a variable, with type `&mut T`.
244+
* Dereference of a movable place, with type `&mut T`. This includes variables and their fields, as well as temporaries.
245245
Note: This is an exception to the requirement of the next rule.
246246
* Dereferences of a type that implements `DerefMut`:
247247
this then requires that the value being dereferenced is evaluated in a mutable place expression context.

0 commit comments

Comments
 (0)