about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-02 18:24:42 +0200
committerGitHub <noreply@github.com>2019-10-02 18:24:42 +0200
commit028ffd136659eabdc1fd4c1d2e2d5f8043440cff (patch)
treeb9bc7971179046e7f8bb1866f82aee8f8e2de876 /src/test/ui
parent7daf2e8946015f0ba1bf69f5be61964a3f29f04e (diff)
parentf0fddb1a89eda1c5588725e23a50b3073f4e7e97 (diff)
downloadrust-028ffd136659eabdc1fd4c1d2e2d5f8043440cff.tar.gz
rust-028ffd136659eabdc1fd4c1d2e2d5f8043440cff.zip
Rollup merge of #64989 - sinkuu:fix_ice_64964, r=davidtwco
Fix ICE #64964

Fixes #64964, which is an ICE with `await`ing in a method + incr-comp.
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/async-await/issues/issue-64964.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/async-await/issues/issue-64964.rs b/src/test/ui/async-await/issues/issue-64964.rs
new file mode 100644
index 00000000000..11f6cb6af9c
--- /dev/null
+++ b/src/test/ui/async-await/issues/issue-64964.rs
@@ -0,0 +1,22 @@
+// check-pass
+// compile-flags: -Z query-dep-graph
+// edition:2018
+
+// Regression test for ICE related to `await`ing in a method + incr. comp. (#64964)
+
+struct Body;
+impl Body {
+    async fn next(&mut self) {
+        async {}.await
+    }
+}
+
+// Another reproduction: `await`ing with a variable from for-loop.
+
+async fn bar() {
+    for x in 0..10 {
+        async { Some(x) }.await.unwrap();
+    }
+}
+
+fn main() {}