]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk
[rust.git] / src / test / mir-opt / const_debuginfo.main.ConstDebugInfo.diff
1 - // MIR for `main` before ConstDebugInfo
2 + // MIR for `main` after ConstDebugInfo
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/const_debuginfo.rs:+0:11: +0:11
6       let _1: u8;                          // in scope 0 at $DIR/const_debuginfo.rs:+1:9: +1:10
7       let mut _5: u8;                      // in scope 0 at $DIR/const_debuginfo.rs:+4:15: +4:20
8       let mut _6: u8;                      // in scope 0 at $DIR/const_debuginfo.rs:+4:15: +4:16
9       let mut _7: u8;                      // in scope 0 at $DIR/const_debuginfo.rs:+4:19: +4:20
10       let mut _8: u8;                      // in scope 0 at $DIR/const_debuginfo.rs:+4:23: +4:24
11       let mut _14: u32;                    // in scope 0 at $DIR/const_debuginfo.rs:+13:13: +13:16
12       let mut _15: u32;                    // in scope 0 at $DIR/const_debuginfo.rs:+13:19: +13:22
13       scope 1 {
14 -         debug x => _1;                   // in scope 1 at $DIR/const_debuginfo.rs:+1:9: +1:10
15 +         debug x => const 1_u8;           // in scope 1 at $DIR/const_debuginfo.rs:+1:9: +1:10
16           let _2: u8;                      // in scope 1 at $DIR/const_debuginfo.rs:+2:9: +2:10
17           scope 2 {
18 -             debug y => _2;               // in scope 2 at $DIR/const_debuginfo.rs:+2:9: +2:10
19 +             debug y => const 2_u8;       // in scope 2 at $DIR/const_debuginfo.rs:+2:9: +2:10
20               let _3: u8;                  // in scope 2 at $DIR/const_debuginfo.rs:+3:9: +3:10
21               scope 3 {
22 -                 debug z => _3;           // in scope 3 at $DIR/const_debuginfo.rs:+3:9: +3:10
23 +                 debug z => const 3_u8;   // in scope 3 at $DIR/const_debuginfo.rs:+3:9: +3:10
24                   let _4: u8;              // in scope 3 at $DIR/const_debuginfo.rs:+4:9: +4:12
25                   scope 4 {
26 -                     debug sum => _4;     // in scope 4 at $DIR/const_debuginfo.rs:+4:9: +4:12
27 +                     debug sum => const 6_u8; // in scope 4 at $DIR/const_debuginfo.rs:+4:9: +4:12
28                       let _9: &str;        // in scope 4 at $DIR/const_debuginfo.rs:+6:9: +6:10
29                       scope 5 {
30 -                         debug s => _9;   // in scope 5 at $DIR/const_debuginfo.rs:+6:9: +6:10
31 +                         debug s => const "hello, world!"; // in scope 5 at $DIR/const_debuginfo.rs:+6:9: +6:10
32                           let _10: (bool, bool, u32); // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
33                           let _16: bool;   // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
34                           let _17: bool;   // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
35                           let _18: u32;    // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
36                           scope 6 {
37                               debug f => (bool, bool, u32){ .0 => _16, .1 => _17, .2 => _18, }; // in scope 6 at $DIR/const_debuginfo.rs:+8:9: +8:10
38                               let _11: std::option::Option<u16>; // in scope 6 at $DIR/const_debuginfo.rs:+10:9: +10:10
39                               scope 7 {
40                                   debug o => _11; // in scope 7 at $DIR/const_debuginfo.rs:+10:9: +10:10
41                                   let _12: Point; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
42                                   let _19: u32; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
43                                   let _20: u32; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
44                                   scope 8 {
45                                       debug p => Point{ .0 => _19, .1 => _20, }; // in scope 8 at $DIR/const_debuginfo.rs:+12:9: +12:10
46                                       let _13: u32; // in scope 8 at $DIR/const_debuginfo.rs:+13:9: +13:10
47                                       scope 9 {
48 -                                         debug a => _13; // in scope 9 at $DIR/const_debuginfo.rs:+13:9: +13:10
49 +                                         debug a => const 64_u32; // in scope 9 at $DIR/const_debuginfo.rs:+13:9: +13:10
50                                       }
51                                   }
52                               }
53                           }
54                       }
55                   }
56               }
57           }
58       }
59   
60       bb0: {
61           StorageLive(_1);                 // scope 0 at $DIR/const_debuginfo.rs:+1:9: +1:10
62           _1 = const 1_u8;                 // scope 0 at $DIR/const_debuginfo.rs:+1:13: +1:16
63           StorageLive(_2);                 // scope 1 at $DIR/const_debuginfo.rs:+2:9: +2:10
64           _2 = const 2_u8;                 // scope 1 at $DIR/const_debuginfo.rs:+2:13: +2:16
65           StorageLive(_3);                 // scope 2 at $DIR/const_debuginfo.rs:+3:9: +3:10
66           _3 = const 3_u8;                 // scope 2 at $DIR/const_debuginfo.rs:+3:13: +3:16
67           StorageLive(_4);                 // scope 3 at $DIR/const_debuginfo.rs:+4:9: +4:12
68           StorageLive(_5);                 // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:20
69           StorageLive(_6);                 // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:16
70           _6 = const 1_u8;                 // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:16
71           StorageLive(_7);                 // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
72           _7 = const 2_u8;                 // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
73           _5 = const 3_u8;                 // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:20
74           StorageDead(_7);                 // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
75           StorageDead(_6);                 // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
76           StorageLive(_8);                 // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
77           _8 = const 3_u8;                 // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
78           _4 = const 6_u8;                 // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:24
79           StorageDead(_8);                 // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
80           StorageDead(_5);                 // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
81           StorageLive(_9);                 // scope 4 at $DIR/const_debuginfo.rs:+6:9: +6:10
82           _9 = const "hello, world!";      // scope 4 at $DIR/const_debuginfo.rs:+6:13: +6:28
83                                            // mir::Constant
84                                            // + span: $DIR/const_debuginfo.rs:14:13: 14:28
85                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
86           StorageLive(_16);                // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
87           StorageLive(_17);                // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
88           StorageLive(_18);                // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
89           Deinit(_16);                     // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
90           Deinit(_17);                     // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
91           Deinit(_18);                     // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
92           _16 = const true;                // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
93           _17 = const false;               // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
94           _18 = const 123_u32;             // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
95           StorageLive(_11);                // scope 6 at $DIR/const_debuginfo.rs:+10:9: +10:10
96           Deinit(_11);                     // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
97           ((_11 as Some).0: u16) = const 99_u16; // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
98           discriminant(_11) = 1;           // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
99           StorageLive(_19);                // scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
100           StorageLive(_20);                // scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
101           Deinit(_19);                     // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
102           Deinit(_20);                     // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
103           _19 = const 32_u32;              // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
104           _20 = const 32_u32;              // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
105           StorageLive(_13);                // scope 8 at $DIR/const_debuginfo.rs:+13:9: +13:10
106           StorageLive(_14);                // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:16
107           _14 = const 32_u32;              // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:16
108           StorageLive(_15);                // scope 8 at $DIR/const_debuginfo.rs:+13:19: +13:22
109           _15 = const 32_u32;              // scope 8 at $DIR/const_debuginfo.rs:+13:19: +13:22
110           _13 = const 64_u32;              // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:22
111           StorageDead(_15);                // scope 8 at $DIR/const_debuginfo.rs:+13:21: +13:22
112           StorageDead(_14);                // scope 8 at $DIR/const_debuginfo.rs:+13:21: +13:22
113           nop;                             // scope 0 at $DIR/const_debuginfo.rs:+0:11: +14:2
114           StorageDead(_13);                // scope 8 at $DIR/const_debuginfo.rs:+14:1: +14:2
115           StorageDead(_19);                // scope 7 at $DIR/const_debuginfo.rs:+14:1: +14:2
116           StorageDead(_20);                // scope 7 at $DIR/const_debuginfo.rs:+14:1: +14:2
117           StorageDead(_11);                // scope 6 at $DIR/const_debuginfo.rs:+14:1: +14:2
118           StorageDead(_16);                // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
119           StorageDead(_17);                // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
120           StorageDead(_18);                // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
121           StorageDead(_9);                 // scope 4 at $DIR/const_debuginfo.rs:+14:1: +14:2
122           StorageDead(_4);                 // scope 3 at $DIR/const_debuginfo.rs:+14:1: +14:2
123           StorageDead(_3);                 // scope 2 at $DIR/const_debuginfo.rs:+14:1: +14:2
124           StorageDead(_2);                 // scope 1 at $DIR/const_debuginfo.rs:+14:1: +14:2
125           StorageDead(_1);                 // scope 0 at $DIR/const_debuginfo.rs:+14:1: +14:2
126           return;                          // scope 0 at $DIR/const_debuginfo.rs:+14:2: +14:2
127       }
128   }
129