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