]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir
Fix font color for help button in ayu and dark themes
[rust.git] / src / test / mir-opt / box_expr.main.ElaborateDrops.before.mir
1 // MIR for `main` before ElaborateDrops
2
3 fn main() -> () {
4     let mut _0: ();                      // return place in scope 0 at $DIR/box_expr.rs:6:11: 6:11
5     let _1: std::boxed::Box<S>;          // in scope 0 at $DIR/box_expr.rs:7:9: 7:10
6     let mut _2: std::boxed::Box<S>;      // in scope 0 at $DIR/box_expr.rs:7:13: 7:25
7     let _3: ();                          // in scope 0 at $DIR/box_expr.rs:8:5: 8:12
8     let mut _4: std::boxed::Box<S>;      // in scope 0 at $DIR/box_expr.rs:8:10: 8:11
9     scope 1 {
10         debug x => _1;                   // in scope 1 at $DIR/box_expr.rs:7:9: 7:10
11     }
12
13     bb0: {
14         StorageLive(_1);                 // scope 0 at $DIR/box_expr.rs:7:9: 7:10
15         StorageLive(_2);                 // scope 0 at $DIR/box_expr.rs:7:13: 7:25
16         _2 = Box(S);                     // scope 0 at $DIR/box_expr.rs:7:13: 7:25
17         (*_2) = const S::new() -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/box_expr.rs:7:17: 7:25
18                                          // ty::Const
19                                          // + ty: fn() -> S {S::new}
20                                          // + val: Value(Scalar(<ZST>))
21                                          // mir::Constant
22                                          // + span: $DIR/box_expr.rs:7:17: 7:23
23                                          // + literal: Const { ty: fn() -> S {S::new}, val: Value(Scalar(<ZST>)) }
24     }
25
26     bb1 (cleanup): {
27         resume;                          // scope 0 at $DIR/box_expr.rs:6:1: 9:2
28     }
29
30     bb2: {
31         _1 = move _2;                    // scope 0 at $DIR/box_expr.rs:7:13: 7:25
32         drop(_2) -> bb4;                 // scope 0 at $DIR/box_expr.rs:7:24: 7:25
33     }
34
35     bb3 (cleanup): {
36         drop(_2) -> bb1;                 // scope 0 at $DIR/box_expr.rs:7:24: 7:25
37     }
38
39     bb4: {
40         StorageDead(_2);                 // scope 0 at $DIR/box_expr.rs:7:24: 7:25
41         StorageLive(_3);                 // scope 1 at $DIR/box_expr.rs:8:5: 8:12
42         StorageLive(_4);                 // scope 1 at $DIR/box_expr.rs:8:10: 8:11
43         _4 = move _1;                    // scope 1 at $DIR/box_expr.rs:8:10: 8:11
44         _3 = const std::mem::drop::<std::boxed::Box<S>>(move _4) -> [return: bb5, unwind: bb7]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12
45                                          // ty::Const
46                                          // + ty: fn(std::boxed::Box<S>) {std::mem::drop::<std::boxed::Box<S>>}
47                                          // + val: Value(Scalar(<ZST>))
48                                          // mir::Constant
49                                          // + span: $DIR/box_expr.rs:8:5: 8:9
50                                          // + literal: Const { ty: fn(std::boxed::Box<S>) {std::mem::drop::<std::boxed::Box<S>>}, val: Value(Scalar(<ZST>)) }
51     }
52
53     bb5: {
54         StorageDead(_4);                 // scope 1 at $DIR/box_expr.rs:8:11: 8:12
55         StorageDead(_3);                 // scope 1 at $DIR/box_expr.rs:8:12: 8:13
56         _0 = const ();                   // scope 0 at $DIR/box_expr.rs:6:11: 9:2
57                                          // ty::Const
58                                          // + ty: ()
59                                          // + val: Value(Scalar(<ZST>))
60                                          // mir::Constant
61                                          // + span: $DIR/box_expr.rs:6:11: 9:2
62                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
63         drop(_1) -> bb8;                 // scope 0 at $DIR/box_expr.rs:9:1: 9:2
64     }
65
66     bb6 (cleanup): {
67         drop(_1) -> bb1;                 // scope 0 at $DIR/box_expr.rs:9:1: 9:2
68     }
69
70     bb7 (cleanup): {
71         drop(_4) -> bb6;                 // scope 1 at $DIR/box_expr.rs:8:11: 8:12
72     }
73
74     bb8: {
75         StorageDead(_1);                 // scope 0 at $DIR/box_expr.rs:9:1: 9:2
76         return;                          // scope 0 at $DIR/box_expr.rs:9:2: 9:2
77     }
78 }