]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir
Remove astconv usage in diagnostic
[rust.git] / tests / mir-opt / generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir
1 // MIR for `main::{closure#0}` 0 generator_drop
2 /* generator_layout = GeneratorLayout {
3     field_tys: {
4         _0: GeneratorSavedTy {
5             ty: std::string::String,
6             source_info: SourceInfo {
7                 span: $DIR/generator_drop_cleanup.rs:11:13: 11:15 (#0),
8                 scope: scope[0],
9             },
10             ignore_for_traits: false,
11         },
12     },
13     variant_fields: {
14         Unresumed(0): [],
15         Returned (1): [],
16         Panicked (2): [],
17         Suspend0 (3): [_0],
18     },
19     storage_conflicts: BitMatrix(1x1) {
20         (_0, _0),
21     },
22 } */
23
24 fn main::{closure#0}(_1: *mut [generator@$DIR/generator_drop_cleanup.rs:10:15: 10:17]) -> () {
25     let mut _0: ();                      // return place in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
26     let mut _2: ();                      // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
27     let _3: std::string::String;         // in scope 0 at $DIR/generator_drop_cleanup.rs:+1:13: +1:15
28     let _4: ();                          // in scope 0 at $DIR/generator_drop_cleanup.rs:+2:9: +2:14
29     let mut _5: ();                      // in scope 0 at $DIR/generator_drop_cleanup.rs:+2:9: +2:14
30     let mut _6: ();                      // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:18: +0:18
31     let mut _7: ();                      // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
32     let mut _8: u32;                     // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
33     scope 1 {
34         debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator_drop_cleanup.rs:+1:13: +1:15
35     }
36
37     bb0: {
38         _8 = discriminant((*_1));        // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
39         switchInt(move _8) -> [0: bb7, 3: bb10, otherwise: bb11]; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
40     }
41
42     bb1: {
43         StorageDead(_5);                 // scope 1 at $DIR/generator_drop_cleanup.rs:+2:13: +2:14
44         StorageDead(_4);                 // scope 1 at $DIR/generator_drop_cleanup.rs:+2:14: +2:15
45         drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
46     }
47
48     bb2: {
49         nop;                             // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
50         goto -> bb8;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
51     }
52
53     bb3: {
54         return;                          // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
55     }
56
57     bb4 (cleanup): {
58         resume;                          // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
59     }
60
61     bb5 (cleanup): {
62         nop;                             // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
63         goto -> bb4;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
64     }
65
66     bb6: {
67         return;                          // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
68     }
69
70     bb7: {
71         goto -> bb9;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
72     }
73
74     bb8: {
75         goto -> bb3;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
76     }
77
78     bb9: {
79         goto -> bb6;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
80     }
81
82     bb10: {
83         StorageLive(_4);                 // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
84         StorageLive(_5);                 // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
85         goto -> bb1;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
86     }
87
88     bb11: {
89         return;                          // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
90     }
91 }