We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab1a3f0 commit 9ae1a66Copy full SHA for 9ae1a66
src/test/ui/async-await/issue-64391.rs
@@ -0,0 +1,14 @@
1
+// Regression test for Issue #64391. The goal here is that this
2
+// function compiles. In the past, due to incorrect drop order for
3
+// temporaries in the tail expression, we failed to compile this
4
+// example. The drop order itself is directly tested in
5
+// `drop-order/drop-order-for-temporary-in-tail-return-expr.rs`.
6
+//
7
+// check-pass
8
+// edition:2018
9
+
10
+async fn add(x: u32, y: u32) -> u32 {
11
+ async { x + y }.await
12
+}
13
14
+fn main() { }
0 commit comments