From 18f270ec6f1963ae56fdf85ed21e98c727d06aeb Mon Sep 17 00:00:00 2001 From: bitcp <7768468+bitcp@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:22:06 +0800 Subject: [PATCH 1/3] Change a plural to singular --- src/items/traits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/items/traits.md b/src/items/traits.md index 54239ca749..ce67e8d736 100644 --- a/src/items/traits.md +++ b/src/items/traits.md @@ -31,7 +31,7 @@ r[items.traits.impls] Traits are implemented for specific types through separate [implementations]. r[items.traits.associated-item-decls] -Trait functions may omit the function body by replacing it with a semicolon. This indicates that the implementation must define the function. If the trait function defines a body, this definition acts as a default for any implementation which does not override it. Similarly, associated constants may omit the equals sign and expression to indicate implementations must define the constant value. Associated types must never define the type, the type may only be specified in an implementation. +Trait functions may omit the function body by replacing it with a semicolon. This indicates that the implementation must define the function. If the trait function defines a body, this definition acts as a default for any implementation which does not override it. Similarly, associated constants may omit the equal sign and expression to indicate implementations must define the constant value. Associated types must never define the type, the type may only be specified in an implementation. ```rust // Examples of associated trait items with and without definitions. From 98bf91b40e913c5c6d60c959532cb4513477e097 Mon Sep 17 00:00:00 2001 From: bitcp <7768468+bitcp@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:37:57 +0800 Subject: [PATCH 2/3] list tuple operand of TupleIndexingExpr as place expr context --- src/expressions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/expressions.md b/src/expressions.md index 0cfad80340..c96c5b4bb1 100644 --- a/src/expressions.md +++ b/src/expressions.md @@ -167,6 +167,7 @@ The following contexts are *place expression* contexts: * The operand of a unary [borrow], [raw borrow] or [dereference][deref] operator. * The operand of a field expression. * The indexed operand of an array indexing expression. +* The tuple operand of a tuple indexing expression. * The operand of any [implicit borrow]. * The initializer of a [let statement]. * The [scrutinee] of an [`if let`], [`match`][match], or [`while let`] expression. From 928d6065b00304a2c71864905cc1624829250d39 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 1 Mar 2026 14:33:40 -0800 Subject: [PATCH 3/3] Linkify the rest of the place expression context expressions --- src/expressions.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/expressions.md b/src/expressions.md index c96c5b4bb1..e9002c64a5 100644 --- a/src/expressions.md +++ b/src/expressions.md @@ -165,9 +165,9 @@ The following contexts are *place expression* contexts: * The left operand of a [compound assignment] expression. * The operand of a unary [borrow], [raw borrow] or [dereference][deref] operator. -* The operand of a field expression. -* The indexed operand of an array indexing expression. -* The tuple operand of a tuple indexing expression. +* The operand of a [field expression]. +* The indexed operand of an [array indexing expression]. +* The tuple operand of a [tuple indexing expression]. * The operand of any [implicit borrow]. * The initializer of a [let statement]. * The [scrutinee] of an [`if let`], [`match`][match], or [`while let`] expression. @@ -378,6 +378,7 @@ They are never allowed before: [`while let`]: expressions/loop-expr.md#while-let-patterns [array expressions]: expressions/array-expr.md [array indexing]: expressions/array-expr.md#array-and-slice-indexing-expressions +[array indexing expression]: expr.array.index [assign]: expressions/operator-expr.md#assignment-expressions [block expressions]: expressions/block-expr.md [borrow]: expressions/operator-expr.md#borrow-operators @@ -391,6 +392,7 @@ They are never allowed before: [extending expression]: destructors.scope.lifetime-extension.exprs [extending expressions]: destructors.scope.lifetime-extension.exprs [field]: expressions/field-expr.md +[field expression]: expr.field [functional update]: expressions/struct-expr.md#functional-update-syntax [implicit borrow]: #implicit-borrows [implicitly borrowed]: expr.implicit-borrow @@ -417,6 +419,7 @@ They are never allowed before: [temporary scopes]: destructors.scope.temporary [Temporary values]: #temporaries [tuple expressions]: expressions/tuple-expr.md +[tuple indexing expression]: expr.tuple-index [Tuple structs]: items.struct.tuple [Tuples]: expressions/tuple-expr.md [Underscores]: expressions/underscore-expr.md