Skip to content

Commit 123f129

Browse files
nikomatsakisCentril
andcommitted
apply nits from centril
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
1 parent 00d1590 commit 123f129

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
#![allow(unused_variables)]
66

7-
// Test that the drop order for parameters in a fn and async fn matches up. Also test that
8-
// parameters (used or unused) are not dropped until the async fn completes execution.
9-
// See also #54716.
7+
// Test the drop order for parameters relative to local variables and
8+
// temporaries created in the tail return expression of the function
9+
// body. In particular, check that this drop order is the same between
10+
// a `async fn` and an ordinary `fn`. See #64512.
1011

1112
extern crate arc_wake;
1213

@@ -39,13 +40,13 @@ impl Drop for D {
3940
}
4041
}
4142

42-
/// Check drop order of temporary "temp" as compared to x, y, and z.
43+
/// Check drop order of temporary "temp" as compared to `x`, `y`, and `z`.
4344
///
4445
/// Expected order:
45-
/// - z
46+
/// - `z`
4647
/// - temp
47-
/// - y
48-
/// - x
48+
/// - `y`
49+
/// - `x`
4950
async fn foo_async(x: D, _y: D) {
5051
let l = x.1.clone();
5152
let z = D("z", l.clone());

0 commit comments

Comments
 (0)