]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
Auto merge of #75635 - Aaron1011:fix/incr-fn-param-names, r=eddyb
[rust.git] / src / test / mir-opt / simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
1 - // MIR for `main` before SimplifyLocals
2 + // MIR for `main` after SimplifyLocals
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 12:11
6 -     let mut _1: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
7 -     let mut _2: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
8 -     let mut _3: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
9 -     let _4: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
10 -     let mut _5: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
11 -     let mut _6: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
12 -     let mut _7: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
13 -     let _8: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
14 -     let mut _9: u8;                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
15 -     let mut _10: u8;                     // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
16 -     let mut _11: Temp;                   // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
17 +     let _1: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
18 +     let _2: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
19       scope 1 {
20       }
21   
22       bb0: {
23 -         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
24 -         StorageLive(_2);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
25 -         StorageLive(_3);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
26 -         (_1.0: ()) = const ();           // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
27 +         StorageLive(_1);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
28 +         _1 = const use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
29                                            // ty::Const
30 -                                          // + ty: ()
31 -                                          // + val: Value(Scalar(<ZST>))
32 -                                          // mir::Constant
33 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
34 -                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
35 -         (_1.1: ()) = const ();           // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
36 -                                          // ty::Const
37 -                                          // + ty: ()
38 -                                          // + val: Value(Scalar(<ZST>))
39 -                                          // mir::Constant
40 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
41 -                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
42 -         StorageDead(_3);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
43 -         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
44 -         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:28: 13:29
45 -         StorageLive(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
46 -         StorageLive(_5);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
47 -         StorageLive(_6);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
48 -         StorageLive(_7);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
49 -         (_5.0: ()) = const ();           // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
50 -                                          // ty::Const
51 -                                          // + ty: ()
52 -                                          // + val: Value(Scalar(<ZST>))
53 -                                          // mir::Constant
54 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
55 -                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
56 -         (_5.1: ()) = const ();           // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
57 -                                          // ty::Const
58 -                                          // + ty: ()
59 -                                          // + val: Value(Scalar(<ZST>))
60 -                                          // mir::Constant
61 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
62 -                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
63 -         StorageDead(_7);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21
64 -         StorageDead(_6);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21
65 -         _4 = const use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
66 -                                          // ty::Const
67                                            // + ty: fn(((), ())) {use_zst}
68                                            // + val: Value(Scalar(<ZST>))
69                                            // mir::Constant
70                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:12
71                                            // + literal: Const { ty: fn(((), ())) {use_zst}, val: Value(Scalar(<ZST>)) }
72                                            // ty::Const
73                                            // + ty: ((), ())
74                                            // + val: Value(Scalar(<ZST>))
75                                            // mir::Constant
76                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
77                                            // + literal: Const { ty: ((), ()), val: Value(Scalar(<ZST>)) }
78       }
79   
80       bb1: {
81 -         StorageDead(_5);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:21: 14:22
82 -         StorageDead(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23
83 -         StorageLive(_8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
84 -         StorageLive(_9);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
85 -         StorageLive(_10);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
86 -         StorageLive(_11);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
87 -         (_11.0: u8) = const 40_u8;       // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
88 -         _10 = const 40_u8;               // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
89 -         _9 = const 42_u8;                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
90 -         StorageDead(_10);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:33: 16:34
91 -         _8 = const use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
92 +         StorageDead(_1);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23
93 +         StorageLive(_2);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
94 +         _2 = const use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
95                                            // ty::Const
96                                            // + ty: fn(u8) {use_u8}
97                                            // + val: Value(Scalar(<ZST>))
98                                            // mir::Constant
99                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:11
100                                            // + literal: Const { ty: fn(u8) {use_u8}, val: Value(Scalar(<ZST>)) }
101       }
102   
103       bb2: {
104 -         StorageDead(_9);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:34: 16:35
105 -         StorageDead(_11);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
106 -         StorageDead(_8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
107 +         StorageDead(_2);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
108           _0 = const ();                   // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
109                                            // ty::Const
110                                            // + ty: ()
111                                            // + val: Value(Scalar(<ZST>))
112                                            // mir::Constant
113                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
114                                            // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
115           return;                          // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2
116       }
117   }
118