Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/destructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**:
>
Expand Down Expand Up @@ -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.
Expand Down