Skip to content

Commit e3f9eee

Browse files
committed
Revise editorially
1 parent bd11808 commit e3f9eee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/destructors.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ let declared_first = PrintOnDrop("Dropped last in outer scope");
185185
let declared_last = PrintOnDrop("Dropped first in outer scope");
186186
```
187187

188-
r[destructors.scope.bindings.pattern-drop-order]
189-
If a pattern binds multiple variables, they are dropped in reverse order of declaration.
188+
r[destructors.scope.bindings.patterns]
189+
Variables in patterns are dropped in reverse order of declaration within the pattern.
190190

191191
```rust
192192
# struct PrintOnDrop(&'static str);
@@ -201,8 +201,8 @@ let (declared_first, declared_last) = (
201201
);
202202
```
203203

204-
r[destructors.scope.bindings.or-pattern-declaration-order]
205-
For the purpose of drop order, [or-patterns] declare their bindings in the order given by their first sub-pattern.
204+
r[destructors.scope.bindings.or-patterns]
205+
For the purpose of drop order, [or-patterns] declare bindings in the order given by the first subpattern.
206206

207207
```rust
208208
# struct PrintOnDrop(&'static str);
@@ -211,7 +211,7 @@ For the purpose of drop order, [or-patterns] declare their bindings in the order
211211
# println!("drop({})", self.0);
212212
# }
213213
# }
214-
// Drops `declared_last`, then `declared_first`.
214+
// Drops `declared_last` before `declared_first`.
215215
fn fixed_variable_drop_order<T>(
216216
(Ok([declared_first, declared_last])
217217
| Err([declared_last, declared_first])): Result<[T; 2], [T; 2]>

0 commit comments

Comments
 (0)