]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir
Rollup merge of #106928 - bvanjoi:print-keyword-raw-identifier, r=petrochenkov
[rust.git] / tests / mir-opt / generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir
1 // MIR for `main::{closure#0}` before StateTransform
2
3 fn main::{closure#0}(_1: [generator@$DIR/generator_storage_dead_unwind.rs:22:16: 22:18], _2: ()) -> ()
4 yields ()
5  {
6     let mut _0: ();                      // return place in scope 0 at $DIR/generator_storage_dead_unwind.rs:+0:19: +0:19
7     let _3: Foo;                         // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+1:13: +1:14
8     let _5: ();                          // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
9     let mut _6: ();                      // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
10     let _7: ();                          // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+4:9: +4:16
11     let mut _8: Foo;                     // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+4:14: +4:15
12     let _9: ();                          // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+5:9: +5:16
13     let mut _10: Bar;                    // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+5:14: +5:15
14     scope 1 {
15         debug a => _3;                   // in scope 1 at $DIR/generator_storage_dead_unwind.rs:+1:13: +1:14
16         let _4: Bar;                     // in scope 1 at $DIR/generator_storage_dead_unwind.rs:+2:13: +2:14
17         scope 2 {
18             debug b => _4;               // in scope 2 at $DIR/generator_storage_dead_unwind.rs:+2:13: +2:14
19         }
20     }
21
22     bb0: {
23         StorageLive(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+1:13: +1:14
24         _3 = Foo(const 5_i32);           // scope 0 at $DIR/generator_storage_dead_unwind.rs:+1:17: +1:23
25         StorageLive(_4);                 // scope 1 at $DIR/generator_storage_dead_unwind.rs:+2:13: +2:14
26         _4 = Bar(const 6_i32);           // scope 1 at $DIR/generator_storage_dead_unwind.rs:+2:17: +2:23
27         StorageLive(_5);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
28         StorageLive(_6);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
29         _6 = ();                         // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
30         _5 = yield(move _6) -> [resume: bb1, drop: bb6]; // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
31     }
32
33     bb1: {
34         StorageDead(_6);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:13: +3:14
35         StorageDead(_5);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:14: +3:15
36         StorageLive(_7);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:9: +4:16
37         StorageLive(_8);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:14: +4:15
38         _8 = move _3;                    // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:14: +4:15
39         _7 = take::<Foo>(move _8) -> [return: bb2, unwind: bb10]; // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:9: +4:16
40                                          // mir::Constant
41                                          // + span: $DIR/generator_storage_dead_unwind.rs:26:9: 26:13
42                                          // + literal: Const { ty: fn(Foo) {take::<Foo>}, val: Value(<ZST>) }
43     }
44
45     bb2: {
46         StorageDead(_8);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:15: +4:16
47         StorageDead(_7);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:16: +4:17
48         StorageLive(_9);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:9: +5:16
49         StorageLive(_10);                // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:14: +5:15
50         _10 = move _4;                   // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:14: +5:15
51         _9 = take::<Bar>(move _10) -> [return: bb3, unwind: bb9]; // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:9: +5:16
52                                          // mir::Constant
53                                          // + span: $DIR/generator_storage_dead_unwind.rs:27:9: 27:13
54                                          // + literal: Const { ty: fn(Bar) {take::<Bar>}, val: Value(<ZST>) }
55     }
56
57     bb3: {
58         StorageDead(_10);                // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:15: +5:16
59         StorageDead(_9);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:16: +5:17
60         _0 = const ();                   // scope 0 at $DIR/generator_storage_dead_unwind.rs:+0:19: +6:6
61         StorageDead(_4);                 // scope 1 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
62         goto -> bb4;                     // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
63     }
64
65     bb4: {
66         StorageDead(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
67         drop(_1) -> [return: bb5, unwind: bb14]; // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
68     }
69
70     bb5: {
71         return;                          // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:6: +6:6
72     }
73
74     bb6: {
75         StorageDead(_6);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:13: +3:14
76         StorageDead(_5);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:14: +3:15
77         StorageDead(_4);                 // scope 1 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
78         drop(_3) -> [return: bb7, unwind: bb15]; // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
79     }
80
81     bb7: {
82         StorageDead(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
83         drop(_1) -> [return: bb8, unwind: bb14]; // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
84     }
85
86     bb8: {
87         generator_drop;                  // scope 0 at $DIR/generator_storage_dead_unwind.rs:+0:16: +6:6
88     }
89
90     bb9 (cleanup): {
91         StorageDead(_10);                // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:15: +5:16
92         StorageDead(_9);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:16: +5:17
93         goto -> bb12;                    // scope 2 at no-location
94     }
95
96     bb10 (cleanup): {
97         goto -> bb11;                    // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:15: +4:16
98     }
99
100     bb11 (cleanup): {
101         StorageDead(_8);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:15: +4:16
102         StorageDead(_7);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:16: +4:17
103         goto -> bb12;                    // scope 2 at no-location
104     }
105
106     bb12 (cleanup): {
107         StorageDead(_4);                 // scope 1 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
108         goto -> bb13;                    // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
109     }
110
111     bb13 (cleanup): {
112         StorageDead(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
113         drop(_1) -> bb14;                // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
114     }
115
116     bb14 (cleanup): {
117         resume;                          // scope 0 at $DIR/generator_storage_dead_unwind.rs:+0:16: +6:6
118     }
119
120     bb15 (cleanup): {
121         StorageDead(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
122         drop(_1) -> bb14;                // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
123     }
124 }