]> git.lizzy.rs Git - rust.git/commitdiff
apply nits from centril
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 17 Sep 2019 08:50:40 +0000 (04:50 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 17 Sep 2019 08:53:28 +0000 (04:53 -0400)
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs

index e250506cdf0af90b4e0e4b379964fdd9d7b38949..e40acff6dc1175af0966a7fd5d5bafe6670b57d7 100644 (file)
@@ -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 @@ fn drop(&mut self) {
     }
 }
 
-/// 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());