@@ -8,45 +8,62 @@ fn foo() -> () {
88 debug y => _1;
99 debug x => _2;
1010 bb0: {
11+ StorageLive(_1);
1112 _1 = 0_i32;
13+ StorageLive(_2);
14+ StorageLive(_3);
1215 _3 = &_1;
1316 _2 = {coroutine-closure@$DIR/async-closure.rs:9:13: 9:21}(move _3);
17+ StorageDead(_3);
18+ _0 = ();
19+ StorageDead(_2);
20+ StorageDead(_1);
1421 return;
1522 }
1623}
1724fn foo::{closure#0}(_1: &{async closure@$DIR/async-closure.rs:9:13: 9:21}) -> {async closure body@$DIR/async-closure.rs:9:22: 11:6} {
1825 let mut _0: {async closure body@$DIR/async-closure.rs:9:22: 11:6};
1926 let mut _2: &i32;
27+ let mut _3: &i32;
2028 debug y => (*((*_1).0: &i32));
2129 bb0: {
22- _2 = CopyForDeref(((*_1).0: &i32));
23- _0 = {coroutine@$DIR/async-closure.rs:9:22: 11:6}(_2);
30+ StorageLive(_2);
31+ _3 = CopyForDeref(((*_1).0: &i32));
32+ _2 = &(*_3);
33+ _0 = {coroutine@$DIR/async-closure.rs:9:22: 11:6}(move _2);
34+ StorageDead(_2);
2435 return;
2536 }
2637}
2738fn foo::{closure#0}::{closure#0}(_1: Pin<&mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}>, _2: &mut Context<'_>) -> Poll<()> {
2839 let mut _0: Poll<()>;
2940 let _3: i32;
3041 let mut _4: &i32;
31- let mut _5: u32 ;
32- let mut _6: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6} ;
33- let mut _7: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6} ;
42+ let mut _5: () ;
43+ let mut _6: &mut Context<'_> ;
44+ let mut _7: u32 ;
3445 let mut _8: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6};
35- debug _task_context => _2;
46+ let mut _9: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6};
47+ let mut _10: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6};
48+ debug _task_context => _6;
3649 debug y => (*((*(_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6})).0: &i32));
3750 debug y => _3;
3851 bb0: {
39- _6 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
40- _5 = discriminant((*_6 ));
41- switchInt(move _5 ) -> [0: bb1, 1: bb2, otherwise: bb3];
52+ _8 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
53+ _7 = discriminant((*_8 ));
54+ switchInt(move _7 ) -> [0: bb1, 1: bb2, otherwise: bb3];
4255 }
4356 bb1: {
44- _7 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
45- _4 = CopyForDeref(((*_7).0: &i32));
57+ _6 = move _2;
58+ StorageLive(_3);
59+ _9 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
60+ _4 = CopyForDeref(((*_9).0: &i32));
4661 _3 = (*_4);
47- _0 = std::task::Poll::Ready(());
48- _8 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
49- discriminant((*_8) = 1;
62+ _5 = ();
63+ StorageDead(_3);
64+ _0 = std::task::Poll::Ready(move _5);
65+ _10 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
66+ discriminant((*_10) = 1;
5067 return;
5168 }
5269 bb2: {
@@ -60,25 +77,31 @@ fn foo::{closure#0}::{synthetic#0}(_1: Pin<&mut {async closure body@$DIR/async-c
6077 let mut _0: Poll<()>;
6178 let _3: i32;
6279 let mut _4: &i32;
63- let mut _5: u32 ;
64- let mut _6: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6} ;
65- let mut _7: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6} ;
80+ let mut _5: () ;
81+ let mut _6: &mut Context<'_> ;
82+ let mut _7: u32 ;
6683 let mut _8: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6};
67- debug _task_context => _2;
84+ let mut _9: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6};
85+ let mut _10: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6};
86+ debug _task_context => _6;
6887 debug y => (*((*(_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6})).0: &i32));
6988 debug y => _3;
7089 bb0: {
71- _6 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
72- _5 = discriminant((*_6 ));
73- switchInt(move _5 ) -> [0: bb1, 1: bb2, otherwise: bb3];
90+ _8 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
91+ _7 = discriminant((*_8 ));
92+ switchInt(move _7 ) -> [0: bb1, 1: bb2, otherwise: bb3];
7493 }
7594 bb1: {
76- _7 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
77- _4 = CopyForDeref(((*_7).0: &i32));
95+ _6 = move _2;
96+ StorageLive(_3);
97+ _9 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
98+ _4 = CopyForDeref(((*_9).0: &i32));
7899 _3 = (*_4);
79- _0 = std::task::Poll::Ready(());
80- _8 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
81- discriminant((*_8) = 1;
100+ _5 = ();
101+ StorageDead(_3);
102+ _0 = std::task::Poll::Ready(move _5);
103+ _10 = CopyForDeref((_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}));
104+ discriminant((*_10) = 1;
82105 return;
83106 }
84107 bb2: {
0 commit comments