We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f8895 commit cd9f709Copy full SHA for cd9f709
src/test/ui/async-await/issues/issue-69307-nested.rs
@@ -0,0 +1,30 @@
1
+// Regression test for #69307
2
+//
3
+// Having a `async { .. foo.await .. }` block appear inside of a `+=`
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 += {
19
+ block_on(async {
20
+ baz().await;
21
+ let mut inner = 1;
22
+ inner += block_on(async {
23
24
25
+ })
26
27
+ };
28
29
30
+async fn baz() {}
0 commit comments