]> git.lizzy.rs Git - rust.git/commitdiff
Add a test case for #102383
authorEric Holk <ericholk@microsoft.com>
Tue, 10 Jan 2023 00:19:36 +0000 (16:19 -0800)
committerEric Holk <ericholk@microsoft.com>
Thu, 12 Jan 2023 19:58:24 +0000 (11:58 -0800)
tests/ui/async-await/await-sequence.rs [new file with mode: 0644]

diff --git a/tests/ui/async-await/await-sequence.rs b/tests/ui/async-await/await-sequence.rs
new file mode 100644 (file)
index 0000000..726c428
--- /dev/null
@@ -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);
+}