about summary refs log tree commit diff
path: root/tests/ui/async-await/await-sequence.rs
diff options
context:
space:
mode:
authorEric Holk <ericholk@microsoft.com>2023-01-09 16:19:36 -0800
committerEric Holk <ericholk@microsoft.com>2023-01-12 11:58:24 -0800
commit96de375e6773836e47c69fd23e55c77c509a5419 (patch)
tree904513f66bbf555d74a5e8c7be2956744d7c811b /tests/ui/async-await/await-sequence.rs
parent222d1ff68d5bfe1dc2d7f3f0c42811fe12964af9 (diff)
downloadrust-96de375e6773836e47c69fd23e55c77c509a5419.tar.gz
rust-96de375e6773836e47c69fd23e55c77c509a5419.zip
Add a test case for #102383
Diffstat (limited to 'tests/ui/async-await/await-sequence.rs')
-rw-r--r--tests/ui/async-await/await-sequence.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/async-await/await-sequence.rs b/tests/ui/async-await/await-sequence.rs
new file mode 100644
index 00000000000..726c4284ec1
--- /dev/null
+++ b/tests/ui/async-await/await-sequence.rs
@@ -0,0 +1,21 @@
+// edition:2021
+// compile-flags: -Z drop-tracking
+// build-pass
+
+use std::collections::HashMap;
+
+fn main() {
+    let _ = real_main();
+}
+
+async fn nop() {}
+
+async fn real_main() {
+    nop().await;
+    nop().await;
+    nop().await;
+    nop().await;
+
+    let mut map: HashMap<(), ()> = HashMap::new();
+    map.insert((), nop().await);
+}