]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/remove_storage_markers.main.RemoveStorageMarkers.diff
Auto merge of #99983 - RalfJung:more-layout-checks, r=eddyb
[rust.git] / src / test / mir-opt / remove_storage_markers.main.RemoveStorageMarkers.diff
1 - // MIR for `main` before RemoveStorageMarkers
2 + // MIR for `main` after RemoveStorageMarkers
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/remove_storage_markers.rs:+0:11: +0:11
6       let mut _1: i32;                     // in scope 0 at $DIR/remove_storage_markers.rs:+1:9: +1:16
7       let mut _2: std::ops::Range<i32>;    // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
8       let mut _3: std::ops::Range<i32>;    // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
9       let mut _5: ();                      // in scope 0 at $DIR/remove_storage_markers.rs:+0:1: +5:2
10       let _6: ();                          // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
11       let mut _7: std::option::Option<i32>; // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
12       let mut _8: &mut std::ops::Range<i32>; // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
13       let mut _9: &mut std::ops::Range<i32>; // in scope 0 at $DIR/remove_storage_markers.rs:+2:14: +2:19
14       let mut _10: isize;                  // in scope 0 at $DIR/remove_storage_markers.rs:+2:5: +4:6
15       let mut _11: !;                      // in scope 0 at $DIR/remove_storage_markers.rs:+2:5: +4:6
16       let mut _13: i32;                    // in scope 0 at $DIR/remove_storage_markers.rs:+3:16: +3:17
17       scope 1 {
18           debug sum => _1;                 // in scope 1 at $DIR/remove_storage_markers.rs:+1:9: +1:16
19           let mut _4: std::ops::Range<i32>; // in scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
20           scope 2 {
21               debug iter => _4;            // in scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
22               let _12: i32;                // in scope 2 at $DIR/remove_storage_markers.rs:+2:9: +2:10
23               scope 3 {
24                   debug i => _12;          // in scope 3 at $DIR/remove_storage_markers.rs:+2:9: +2:10
25               }
26               scope 5 (inlined iter::range::<impl Iterator for std::ops::Range<i32>>::next) { // at $DIR/remove_storage_markers.rs:8:14: 8:19
27                   debug self => _8;        // in scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL
28                   let mut _14: &mut std::ops::Range<i32>; // in scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL
29               }
30           }
31           scope 4 (inlined <std::ops::Range<i32> as IntoIterator>::into_iter) { // at $DIR/remove_storage_markers.rs:8:14: 8:19
32               debug self => _3;            // in scope 4 at $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
33           }
34       }
35   
36       bb0: {
37 -         StorageLive(_1);                 // scope 0 at $DIR/remove_storage_markers.rs:+1:9: +1:16
38           _1 = const 0_i32;                // scope 0 at $DIR/remove_storage_markers.rs:+1:19: +1:20
39 -         StorageLive(_2);                 // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
40 -         StorageLive(_3);                 // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
41           Deinit(_3);                      // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
42           (_3.0: i32) = const 0_i32;       // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
43           (_3.1: i32) = const 10_i32;      // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
44           _2 = move _3;                    // scope 4 at $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
45 -         StorageDead(_3);                 // scope 1 at $DIR/remove_storage_markers.rs:+2:18: +2:19
46 -         StorageLive(_4);                 // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
47           _4 = move _2;                    // scope 1 at $DIR/remove_storage_markers.rs:+2:14: +2:19
48           goto -> bb1;                     // scope 2 at $DIR/remove_storage_markers.rs:+2:5: +4:6
49       }
50   
51       bb1: {
52 -         StorageLive(_6);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
53 -         StorageLive(_7);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
54 -         StorageLive(_8);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
55 -         StorageLive(_9);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
56           _9 = &mut _4;                    // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
57           _8 = &mut (*_9);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
58 -         StorageLive(_14);                // scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL
59           _14 = &mut (*_8);                // scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL
60           _7 = <std::ops::Range<i32> as iter::range::RangeIteratorImpl>::spec_next(move _14) -> bb4; // scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL
61                                            // mir::Constant
62                                            // + span: $SRC_DIR/core/src/iter/range.rs:LL:COL
63                                            // + literal: Const { ty: for<'r> fn(&'r mut std::ops::Range<i32>) -> Option<<std::ops::Range<i32> as iter::range::RangeIteratorImpl>::Item> {<std::ops::Range<i32> as iter::range::RangeIteratorImpl>::spec_next}, val: Value(<ZST>) }
64       }
65   
66       bb2: {
67 -         StorageLive(_12);                // scope 2 at $DIR/remove_storage_markers.rs:+2:9: +2:10
68           _12 = ((_7 as Some).0: i32);     // scope 2 at $DIR/remove_storage_markers.rs:+2:9: +2:10
69 -         StorageLive(_13);                // scope 3 at $DIR/remove_storage_markers.rs:+3:16: +3:17
70           _13 = _12;                       // scope 3 at $DIR/remove_storage_markers.rs:+3:16: +3:17
71           _1 = Add(_1, move _13);          // scope 3 at $DIR/remove_storage_markers.rs:+3:9: +3:17
72 -         StorageDead(_13);                // scope 3 at $DIR/remove_storage_markers.rs:+3:16: +3:17
73           _6 = const ();                   // scope 3 at $DIR/remove_storage_markers.rs:+2:20: +4:6
74 -         StorageDead(_12);                // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
75 -         StorageDead(_9);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
76 -         StorageDead(_7);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
77 -         StorageDead(_6);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
78           _5 = const ();                   // scope 2 at $DIR/remove_storage_markers.rs:+2:5: +4:6
79           goto -> bb1;                     // scope 2 at $DIR/remove_storage_markers.rs:+2:5: +4:6
80       }
81   
82       bb3: {
83           _0 = const ();                   // scope 2 at $DIR/remove_storage_markers.rs:+2:5: +4:6
84 -         StorageDead(_9);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
85 -         StorageDead(_7);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
86 -         StorageDead(_6);                 // scope 2 at $DIR/remove_storage_markers.rs:+4:5: +4:6
87 -         StorageDead(_4);                 // scope 1 at $DIR/remove_storage_markers.rs:+4:5: +4:6
88 -         StorageDead(_2);                 // scope 1 at $DIR/remove_storage_markers.rs:+4:5: +4:6
89 -         StorageDead(_1);                 // scope 0 at $DIR/remove_storage_markers.rs:+5:1: +5:2
90           return;                          // scope 0 at $DIR/remove_storage_markers.rs:+5:2: +5:2
91       }
92   
93       bb4: {
94 -         StorageDead(_14);                // scope 5 at $SRC_DIR/core/src/iter/range.rs:LL:COL
95 -         StorageDead(_8);                 // scope 2 at $DIR/remove_storage_markers.rs:+2:18: +2:19
96           _10 = discriminant(_7);          // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
97           switchInt(move _10) -> [0_isize: bb3, otherwise: bb2]; // scope 2 at $DIR/remove_storage_markers.rs:+2:14: +2:19
98       }
99   }
100