]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-64391.rs
Rollup merge of #107114 - Erk-:add-absolute-note-to-path-join, r=m-ou-se
[rust.git] / tests / 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() { }