Skip to content

Commit 566d2c0

Browse files
fix comment in function parameter drop scope example
In "Scopes of function parameters" under "Destructors", the first comment in the example that demonstrates function parameter drop order contradicted both the text and the program behavior.
1 parent c05b152 commit 566d2c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/destructors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ dropped after any bindings introduced in that parameter's pattern.
110110
# println!("drop({})", self.0);
111111
# }
112112
# }
113-
// Drops the second parameter, then `y`, then the first parameter, then `x`
113+
// Drops `y`, then the second parameter, then `x`, then the first parameter
114114
fn patterns_in_parameters(
115115
(x, _): (PrintOnDrop, PrintOnDrop),
116116
(_, y): (PrintOnDrop, PrintOnDrop),

0 commit comments

Comments
 (0)