1 // MIR for `array_casts` after SimplifyCfg-elaborate-drops
3 fn array_casts() -> () {
4 let mut _0: (); // return place in scope 0 at $DIR/retag.rs:+0:18: +0:18
5 let mut _1: [usize; 2]; // in scope 0 at $DIR/retag.rs:+1:9: +1:14
6 let mut _3: *mut [usize; 2]; // in scope 0 at $DIR/retag.rs:+2:13: +2:19
7 let mut _4: &mut [usize; 2]; // in scope 0 at $DIR/retag.rs:+2:13: +2:19
8 let _5: (); // in scope 0 at $DIR/retag.rs:+3:5: +3:30
9 let mut _6: *mut usize; // in scope 0 at $DIR/retag.rs:+3:15: +3:23
10 let mut _7: *mut usize; // in scope 0 at $DIR/retag.rs:+3:15: +3:16
11 let mut _10: *const [usize; 2]; // in scope 0 at $DIR/retag.rs:+6:13: +6:15
12 let _11: &[usize; 2]; // in scope 0 at $DIR/retag.rs:+6:13: +6:15
13 let _12: (); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
14 let mut _13: (&usize, &usize); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
15 let mut _14: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
16 let _15: usize; // in scope 0 at $DIR/retag.rs:+7:16: +7:36
17 let mut _16: *const usize; // in scope 0 at $DIR/retag.rs:+7:26: +7:34
18 let mut _17: *const usize; // in scope 0 at $DIR/retag.rs:+7:26: +7:27
19 let mut _18: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
20 let _19: usize; // in scope 0 at $DIR/retag.rs:+7:38: +7:39
21 let mut _22: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
22 let mut _23: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
23 let mut _24: usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
24 let mut _25: usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
25 let mut _26: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
26 let _28: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
27 let mut _29: core::panicking::AssertKind; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
28 let mut _30: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
29 let _31: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
30 let mut _32: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
31 let _33: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
32 let mut _34: std::option::Option<std::fmt::Arguments<'_>>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
34 debug x => _1; // in scope 1 at $DIR/retag.rs:+1:9: +1:14
35 let _2: *mut usize; // in scope 1 at $DIR/retag.rs:+2:9: +2:10
37 debug p => _2; // in scope 2 at $DIR/retag.rs:+2:9: +2:10
38 let _8: [usize; 2]; // in scope 2 at $DIR/retag.rs:+5:9: +5:10
42 debug x => _8; // in scope 4 at $DIR/retag.rs:+5:9: +5:10
43 let _9: *const usize; // in scope 4 at $DIR/retag.rs:+6:9: +6:10
45 debug p => _9; // in scope 5 at $DIR/retag.rs:+6:9: +6:10
46 let _20: &usize; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
47 let _21: &usize; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
48 let mut _35: &usize; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
52 debug left_val => _20; // in scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
53 debug right_val => _21; // in scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
54 let _27: core::panicking::AssertKind; // in scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
56 debug kind => _27; // in scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
65 StorageLive(_1); // scope 0 at $DIR/retag.rs:+1:9: +1:14
66 _1 = [const 0_usize, const 0_usize]; // scope 0 at $DIR/retag.rs:+1:29: +1:35
67 StorageLive(_2); // scope 1 at $DIR/retag.rs:+2:9: +2:10
68 StorageLive(_3); // scope 1 at $DIR/retag.rs:+2:13: +2:19
69 StorageLive(_4); // scope 1 at $DIR/retag.rs:+2:13: +2:19
70 _4 = &mut _1; // scope 1 at $DIR/retag.rs:+2:13: +2:19
71 _3 = &raw mut (*_4); // scope 1 at $DIR/retag.rs:+2:13: +2:19
72 _2 = move _3 as *mut usize (Pointer(ArrayToPointer)); // scope 1 at $DIR/retag.rs:+2:13: +2:33
73 StorageDead(_3); // scope 1 at $DIR/retag.rs:+2:32: +2:33
74 StorageDead(_4); // scope 1 at $DIR/retag.rs:+2:33: +2:34
75 StorageLive(_5); // scope 2 at $DIR/retag.rs:+3:5: +3:30
76 StorageLive(_6); // scope 3 at $DIR/retag.rs:+3:15: +3:23
77 StorageLive(_7); // scope 3 at $DIR/retag.rs:+3:15: +3:16
78 _7 = _2; // scope 3 at $DIR/retag.rs:+3:15: +3:16
79 _6 = ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> bb1; // scope 3 at $DIR/retag.rs:+3:15: +3:23
81 // + span: $DIR/retag.rs:61:17: 61:20
82 // + literal: Const { ty: unsafe fn(*mut usize, usize) -> *mut usize {ptr::mut_ptr::<impl *mut usize>::add}, val: Value(<ZST>) }
86 StorageDead(_7); // scope 3 at $DIR/retag.rs:+3:22: +3:23
87 (*_6) = const 1_usize; // scope 3 at $DIR/retag.rs:+3:14: +3:27
88 StorageDead(_6); // scope 3 at $DIR/retag.rs:+3:27: +3:28
89 _5 = const (); // scope 3 at $DIR/retag.rs:+3:5: +3:30
90 StorageDead(_5); // scope 2 at $DIR/retag.rs:+3:29: +3:30
91 StorageLive(_8); // scope 2 at $DIR/retag.rs:+5:9: +5:10
92 _8 = [const 0_usize, const 1_usize]; // scope 2 at $DIR/retag.rs:+5:25: +5:31
93 StorageLive(_9); // scope 4 at $DIR/retag.rs:+6:9: +6:10
94 StorageLive(_10); // scope 4 at $DIR/retag.rs:+6:13: +6:15
95 StorageLive(_11); // scope 4 at $DIR/retag.rs:+6:13: +6:15
96 _11 = &_8; // scope 4 at $DIR/retag.rs:+6:13: +6:15
97 _10 = &raw const (*_11); // scope 4 at $DIR/retag.rs:+6:13: +6:15
98 _9 = move _10 as *const usize (Pointer(ArrayToPointer)); // scope 4 at $DIR/retag.rs:+6:13: +6:31
99 StorageDead(_10); // scope 4 at $DIR/retag.rs:+6:30: +6:31
100 StorageDead(_11); // scope 4 at $DIR/retag.rs:+6:31: +6:32
101 StorageLive(_12); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
102 StorageLive(_13); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
103 StorageLive(_14); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
104 StorageLive(_15); // scope 5 at $DIR/retag.rs:+7:16: +7:36
105 StorageLive(_16); // scope 6 at $DIR/retag.rs:+7:26: +7:34
106 StorageLive(_17); // scope 6 at $DIR/retag.rs:+7:26: +7:27
107 _17 = _9; // scope 6 at $DIR/retag.rs:+7:26: +7:27
108 _16 = ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> bb2; // scope 6 at $DIR/retag.rs:+7:26: +7:34
110 // + span: $DIR/retag.rs:65:28: 65:31
111 // + literal: Const { ty: unsafe fn(*const usize, usize) -> *const usize {ptr::const_ptr::<impl *const usize>::add}, val: Value(<ZST>) }
115 StorageDead(_17); // scope 6 at $DIR/retag.rs:+7:33: +7:34
116 _15 = (*_16); // scope 6 at $DIR/retag.rs:+7:25: +7:34
117 _14 = &_15; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
118 StorageLive(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
119 _35 = const _; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
121 // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
122 // + literal: Const { ty: &usize, val: Unevaluated(array_casts, [], Some(promoted[0])) }
123 Retag(_35); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
124 _18 = &(*_35); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
125 Deinit(_13); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
126 (_13.0: &usize) = move _14; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
127 (_13.1: &usize) = move _18; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
128 Retag(_13); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
129 StorageDead(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
130 StorageDead(_14); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
131 StorageLive(_20); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
132 _20 = (_13.0: &usize); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
133 Retag(_20); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
134 StorageLive(_21); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
135 _21 = (_13.1: &usize); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
136 Retag(_21); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
137 StorageLive(_22); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
138 StorageLive(_23); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
139 StorageLive(_24); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
140 _24 = (*_20); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
141 StorageLive(_25); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
142 _25 = (*_21); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
143 _23 = Eq(move _24, move _25); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
144 StorageDead(_25); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
145 StorageDead(_24); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
146 _22 = Not(move _23); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
147 StorageDead(_23); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
148 switchInt(move _22) -> [false: bb4, otherwise: bb3]; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
152 StorageLive(_27); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
153 Deinit(_27); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
154 discriminant(_27) = 0; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
155 StorageLive(_28); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
156 StorageLive(_29); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
157 _29 = move _27; // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
158 StorageLive(_30); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
159 StorageLive(_31); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
160 _31 = &(*_20); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
161 _30 = &(*_31); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
162 StorageLive(_32); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
163 StorageLive(_33); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
164 _33 = &(*_21); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
165 _32 = &(*_33); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
166 StorageLive(_34); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
167 Deinit(_34); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
168 discriminant(_34) = 0; // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
169 Retag(_34); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
170 _28 = core::panicking::assert_failed::<usize, usize>(move _29, move _30, move _32, move _34); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
172 // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
173 // + literal: Const { ty: for<'a, 'b, 'c> fn(core::panicking::AssertKind, &'a usize, &'b usize, Option<Arguments<'c>>) -> ! {core::panicking::assert_failed::<usize, usize>}, val: Value(<ZST>) }
177 _12 = const (); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
178 StorageDead(_22); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
179 StorageDead(_21); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
180 StorageDead(_20); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
181 StorageDead(_16); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
182 StorageDead(_15); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
183 StorageDead(_13); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
184 StorageDead(_12); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
185 _0 = const (); // scope 0 at $DIR/retag.rs:+0:18: +8:2
186 StorageDead(_9); // scope 4 at $DIR/retag.rs:+8:1: +8:2
187 StorageDead(_8); // scope 2 at $DIR/retag.rs:+8:1: +8:2
188 StorageDead(_2); // scope 1 at $DIR/retag.rs:+8:1: +8:2
189 StorageDead(_1); // scope 0 at $DIR/retag.rs:+8:1: +8:2
190 return; // scope 0 at $DIR/retag.rs:+8:2: +8:2