From ed5ba7cebeab9780188005c78ca789bed73f381b Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Sun, 4 Jul 2021 19:20:03 -0500 Subject: [PATCH] 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. --- src/destructors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/destructors.md b/src/destructors.md index 89f3dfd65..82ca73cdd 100644 --- a/src/destructors.md +++ b/src/destructors.md @@ -110,7 +110,7 @@ dropped after any bindings introduced in that parameter's pattern. # println!("drop({})", self.0); # } # } -// Drops the second parameter, then `y`, then the first parameter, then `x` +// Drops `y`, then the second parameter, then `x`, then the first parameter fn patterns_in_parameters( (x, _): (PrintOnDrop, PrintOnDrop), (_, y): (PrintOnDrop, PrintOnDrop),