From b1f11e4e93673c1b52e59e40b49c3b30f01646bc Mon Sep 17 00:00:00 2001 From: Tyler Mandry Date: Tue, 31 Jan 2023 14:49:40 -0500 Subject: [PATCH 1/2] Remove "expression for a match arm" wording It's unclear what this bullet means. If it means a match guard, that is covered in the line above. If it referred to the scrutinee, that would be wrong. I don't think it's possible to embed an expression inside of a match arm _pattern_. This came up in the [lang team triage meeting][meeting]. [meeting]: https://hackmd.io/JACzq-ssT4qtH0DS3B8nQQ?both#%E2%80%9CIntroduce-terminating-scope-for-tail-expressions-of-breakable-scopes%E2%80%9D-rust106493 --- src/destructors.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/destructors.md b/src/destructors.md index f89fde157..1d7e04373 100644 --- a/src/destructors.md +++ b/src/destructors.md @@ -162,7 +162,6 @@ smallest scope that contains the expression and is one of the following: * The `else` block of an `if` expression. * The condition expression of an `if` or `while` expression, or a `match` guard. -* The expression for a match arm. * The second operand of a [lazy boolean expression]. > **Notes**: From 27dc03f2cdca30cf810fd3169c33d3f47b488d96 Mon Sep 17 00:00:00 2001 From: Tyler Mandry Date: Tue, 31 Jan 2023 16:03:45 -0500 Subject: [PATCH 2/2] Clarify match arm "expression" as "body expression" --- src/destructors.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/destructors.md b/src/destructors.md index 1d7e04373..84aac89d3 100644 --- a/src/destructors.md +++ b/src/destructors.md @@ -162,6 +162,7 @@ smallest scope that contains the expression and is one of the following: * The `else` block of an `if` expression. * The condition expression of an `if` or `while` expression, or a `match` guard. +* The body expression for a match arm. * The second operand of a [lazy boolean expression]. > **Notes**: