]> git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issue-64391.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / async-await / issue-64391.rs
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() { }