From 4fc067ebcdb2ea2b07489c0db639ac563489ef88 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 22 Nov 2024 08:19:18 -0800 Subject: [PATCH] Fix rule for lazy boolean temporary drop scope --- src/destructors.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/destructors.md b/src/destructors.md index 7cdfaee0f..9870b0148 100644 --- a/src/destructors.md +++ b/src/destructors.md @@ -210,7 +210,7 @@ smallest scope that contains the expression and is one of the following: * 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]. +* Each operand of a [lazy boolean expression]. > **Notes**: > @@ -242,11 +242,11 @@ if PrintOnDrop("If condition").0 == "If condition" { unreachable!() }; -// Dropped at the end of the statement +// Dropped before the first || (PrintOnDrop("first operand").0 == "" -// Dropped at the ) +// Dropped before the ) || PrintOnDrop("second operand").0 == "") -// Dropped at the end of the expression +// Dropped before the ; || PrintOnDrop("third operand").0 == ""; // Dropped at the end of the function, after local variables.