Skip to content

Commit 9ae1a66

Browse files
committed
add regression test for issue-64391
1 parent ab1a3f0 commit 9ae1a66

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)