diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2019-09-17 04:50:40 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2019-09-17 04:53:28 -0400 |
| commit | 123f129f795a5f55a0094263f72d56249656145e (patch) | |
| tree | d61f2c605ac09b4a928e62267e525c618a3eb4aa /src | |
| parent | 00d159095adbb14c7dfaa6a77177be1b58600dc9 (diff) | |
apply nits from centril
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs b/src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs index e250506cdf0..e40acff6dc1 100644 --- a/src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs +++ b/src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs @@ -4,9 +4,10 @@ #![allow(unused_variables)] -// Test that the drop order for parameters in a fn and async fn matches up. Also test that -// parameters (used or unused) are not dropped until the async fn completes execution. -// See also #54716. +// Test the drop order for parameters relative to local variables and +// temporaries created in the tail return expression of the function +// body. In particular, check that this drop order is the same between +// a `async fn` and an ordinary `fn`. See #64512. extern crate arc_wake; @@ -39,13 +40,13 @@ impl Drop for D { } } -/// Check drop order of temporary "temp" as compared to x, y, and z. +/// Check drop order of temporary "temp" as compared to `x`, `y`, and `z`. /// /// Expected order: -/// - z +/// - `z` /// - temp -/// - y -/// - x +/// - `y` +/// - `x` async fn foo_async(x: D, _y: D) { let l = x.1.clone(); let z = D("z", l.clone()); |
