diff options
| author | Andrew Zhogin <andrew.zhogin@gmail.com> | 2025-04-29 20:41:36 +0700 |
|---|---|---|
| committer | Andrew Zhogin <andrew.zhogin@gmail.com> | 2025-04-29 21:41:15 +0700 |
| commit | cce706ec3c4ed38ecaffc61dac3b835038cdc50b (patch) | |
| tree | 9dd89e73e3e9641623bc993537540f35345d9a68 /tests/ui/async-await/async-drop | |
| parent | 4c83e55e2d88ff93155be2784b9f64b91b870e99 (diff) | |
| download | rust-cce706ec3c4ed38ecaffc61dac3b835038cdc50b.tar.gz rust-cce706ec3c4ed38ecaffc61dac3b835038cdc50b.zip | |
Fix for async drop ice with partly dropped tuple
Diffstat (limited to 'tests/ui/async-await/async-drop')
| -rw-r--r-- | tests/ui/async-await/async-drop/partly-dropped-tuple.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-drop/partly-dropped-tuple.rs b/tests/ui/async-await/async-drop/partly-dropped-tuple.rs new file mode 100644 index 00000000000..147caaf4cfd --- /dev/null +++ b/tests/ui/async-await/async-drop/partly-dropped-tuple.rs @@ -0,0 +1,11 @@ +//@ edition: 2024 +//@ build-pass +#![crate_type = "lib"] +#![allow(incomplete_features)] +#![feature(async_drop)] +async fn move_part_await_return_rest_tuple() -> Vec<usize> { + let x = (vec![3], vec![4, 4]); + drop(x.1); + + x.0 +} |
