]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
1 | // Regression test for #69307 |
2 | // | |
94222f64 | 3 | // Having an `async { .. foo.await .. }` block appear inside of a `+=` |
ba9703b0 XL |
4 | // expression was causing an ICE due to a failure to save/restore |
5 | // state in the AST numbering pass when entering a nested body. | |
6 | // | |
7 | // check-pass | |
8 | // edition:2018 | |
9 | ||
10 | fn block_on<F>(_: F) -> usize { | |
11 | 0 | |
12 | } | |
13 | ||
14 | fn main() {} | |
15 | ||
16 | async fn bar() { | |
17 | let mut sum = 0; | |
18 | sum += block_on(async { | |
19 | baz().await; | |
20 | }); | |
21 | } | |
22 | ||
23 | async fn baz() {} |