@@ -8,45 +8,62 @@ fn foo() -> () {
8
8
debug y => _1;
9
9
debug x => _2;
10
10
bb0: {
11
+ StorageLive(_1);
11
12
_1 = 0_i32;
13
+ StorageLive(_2);
14
+ StorageLive(_3);
12
15
_3 = &_1;
13
16
_2 = {coroutine-closure@$DIR/async-closure.rs:9:13: 9:21}(move _3);
17
+ StorageDead(_3);
18
+ _0 = ();
19
+ StorageDead(_2);
20
+ StorageDead(_1);
14
21
return;
15
22
}
16
23
}
17
24
fn 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} {
18
25
let mut _0: {async closure body@$DIR/async-closure.rs:9:22: 11:6};
19
26
let mut _2: &i32;
27
+ let mut _3: &i32;
20
28
debug y => (*((*_1).0: &i32));
21
29
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);
24
35
return;
25
36
}
26
37
}
27
38
fn foo::{closure#0}::{closure#0}(_1: Pin<&mut {async closure body@$DIR/async-closure.rs:9:22: 11:6}>, _2: &mut Context<'_>) -> Poll<()> {
28
39
let mut _0: Poll<()>;
29
40
let _3: i32;
30
41
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 ;
34
45
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;
36
49
debug y => (*((*(_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6})).0: &i32));
37
50
debug y => _3;
38
51
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];
42
55
}
43
56
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));
46
61
_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;
50
67
return;
51
68
}
52
69
bb2: {
@@ -60,25 +77,31 @@ fn foo::{closure#0}::{synthetic#0}(_1: Pin<&mut {async closure body@$DIR/async-c
60
77
let mut _0: Poll<()>;
61
78
let _3: i32;
62
79
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 ;
66
83
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;
68
87
debug y => (*((*(_1.0: &mut {async closure body@$DIR/async-closure.rs:9:22: 11:6})).0: &i32));
69
88
debug y => _3;
70
89
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];
74
93
}
75
94
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));
78
99
_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;
82
105
return;
83
106
}
84
107
bb2: {
0 commit comments