From 87895584c98fa4e784e243301854fc3060323ce5 Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Mon, 23 Jan 2023 16:59:22 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20typo=20=E2=80=9Cassigment=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/expressions/operator-expr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expressions/operator-expr.md b/src/expressions/operator-expr.md index 9f7e8edac..691f801e8 100644 --- a/src/expressions/operator-expr.md +++ b/src/expressions/operator-expr.md @@ -600,7 +600,7 @@ It will then set the value of the assigned operand's place to the value of perfo > **Note**: This is different than other expressions in that the right operand is evaluated before the left one. -Otherwise, this expression is syntactic sugar for calling the function of the overloading compound assigment trait of the operator (see the table earlier in this chapter). +Otherwise, this expression is syntactic sugar for calling the function of the overloading compound assignment trait of the operator (see the table earlier in this chapter). A mutable borrow of the assigned operand is automatically taken. For example, the following expression statements in `example` are equivalent: From 894afd4f72fdb8682c094d2023f3ec3c6c464824 Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Mon, 23 Jan 2023 18:45:19 +0900 Subject: [PATCH 2/2] Fix two more typos --- src/expressions/if-expr.md | 2 +- src/patterns.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/expressions/if-expr.md b/src/expressions/if-expr.md index 591437fc9..fe387c828 100644 --- a/src/expressions/if-expr.md +++ b/src/expressions/if-expr.md @@ -129,7 +129,7 @@ The expression cannot be a [lazy boolean operator expression][_LazyBooleanOperat Use of a lazy boolean operator is ambiguous with a planned feature change of the language (the implementation of if-let chains - see [eRFC 2947][_eRFCIfLetChain_]). When lazy boolean operator expression is desired, this can be achieved by using parenthesis as below: - + ```rust,ignore // Before... if let PAT = EXPR && EXPR { .. } diff --git a/src/patterns.md b/src/patterns.md index 14bbac155..d18f8d0ad 100644 --- a/src/patterns.md +++ b/src/patterns.md @@ -429,7 +429,7 @@ The bounds can be literals or paths that point to constant values. A half open range with only an upper bound is written as `..=` followed by its upper bound. These range patterns will match on any value less than or equal to the upper bound. -For example, `..=10` will match 10, 1, 0, and for signed interger types, all negative values. +For example, `..=10` will match 10, 1, 0, and for signed integer types, all negative values. Half-open range patterns cannot be used as the top-level pattern for subpatterns in [slice patterns](#slice-patterns).