]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-64964.rs
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / test / ui / async-await / issues / issue-64964.rs
1 // check-pass
2 // incremental
3 // compile-flags: -Z query-dep-graph
4 // edition:2018
5
6 // Regression test for ICE related to `await`ing in a method + incr. comp. (#64964)
7
8 struct Body;
9 impl Body {
10     async fn next(&mut self) {
11         async {}.await
12     }
13 }
14
15 // Another reproduction: `await`ing with a variable from for-loop.
16
17 async fn bar() {
18     for x in 0..10 {
19         async { Some(x) }.await.unwrap();
20     }
21 }
22
23 fn main() {}