mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
add regression test for issue-64391
This commit is contained in:
parent
ab1a3f09fd
commit
9ae1a664f7
14
src/test/ui/async-await/issue-64391.rs
Normal file
14
src/test/ui/async-await/issue-64391.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Regression test for Issue #64391. The goal here is that this
|
||||
// function compiles. In the past, due to incorrect drop order for
|
||||
// temporaries in the tail expression, we failed to compile this
|
||||
// example. The drop order itself is directly tested in
|
||||
// `drop-order/drop-order-for-temporary-in-tail-return-expr.rs`.
|
||||
//
|
||||
// check-pass
|
||||
// edition:2018
|
||||
|
||||
async fn add(x: u32, y: u32) -> u32 {
|
||||
async { x + y }.await
|
||||
}
|
||||
|
||||
fn main() { }
|
Loading…
Reference in New Issue
Block a user