]>
Commit | Line | Data |
---|---|---|
487cf647 | 1 | // MIR for `main` after built |
064997fb FG |
2 | |
3 | | User Type Annotations | |
ed00b5ec FG |
4 | | 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">} |
5 | | 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">} | |
064997fb FG |
6 | | |
7 | fn main() -> () { | |
fe692bf9 FG |
8 | let mut _0: (); |
9 | let _1: (); | |
10 | let mut _2: (&&[u8], &&[u8; 4]); | |
11 | let mut _3: &&[u8]; | |
12 | let _4: &[u8]; | |
13 | let mut _5: &&[u8; 4]; | |
14 | let _6: &[u8; 4]; | |
15 | let _7: [u8; 4]; | |
16 | let _8: &&[u8]; | |
17 | let _9: &&[u8; 4]; | |
18 | let mut _10: bool; | |
781aab86 FG |
19 | let mut _11: &&[u8]; |
20 | let mut _12: &&[u8; 4]; | |
21 | let mut _13: !; | |
22 | let _15: !; | |
23 | let mut _16: core::panicking::AssertKind; | |
24 | let mut _17: &&[u8]; | |
25 | let _18: &&[u8]; | |
26 | let mut _19: &&[u8; 4]; | |
27 | let _20: &&[u8; 4]; | |
28 | let mut _21: std::option::Option<std::fmt::Arguments<'_>>; | |
29 | let _22: (); | |
30 | let mut _23: (&&[u8], &&[u8; 4]); | |
31 | let mut _24: &&[u8]; | |
32 | let _25: &[u8]; | |
33 | let mut _26: &&[u8; 4]; | |
34 | let _27: &[u8; 4]; | |
35 | let _28: &&[u8]; | |
36 | let _29: &&[u8; 4]; | |
37 | let mut _30: bool; | |
38 | let mut _31: &&[u8]; | |
39 | let mut _32: &&[u8; 4]; | |
40 | let mut _33: !; | |
41 | let _35: !; | |
42 | let mut _36: core::panicking::AssertKind; | |
43 | let mut _37: &&[u8]; | |
44 | let _38: &&[u8]; | |
45 | let mut _39: &&[u8; 4]; | |
46 | let _40: &&[u8; 4]; | |
47 | let mut _41: std::option::Option<std::fmt::Arguments<'_>>; | |
064997fb | 48 | scope 1 { |
fe692bf9 FG |
49 | debug left_val => _8; |
50 | debug right_val => _9; | |
781aab86 | 51 | let _14: core::panicking::AssertKind; |
064997fb | 52 | scope 2 { |
781aab86 | 53 | debug kind => _14; |
064997fb FG |
54 | } |
55 | } | |
56 | scope 3 { | |
781aab86 FG |
57 | debug left_val => _28; |
58 | debug right_val => _29; | |
59 | let _34: core::panicking::AssertKind; | |
064997fb | 60 | scope 4 { |
781aab86 | 61 | debug kind => _34; |
064997fb FG |
62 | } |
63 | } | |
64 | ||
65 | bb0: { | |
fe692bf9 FG |
66 | StorageLive(_1); |
67 | StorageLive(_2); | |
68 | StorageLive(_3); | |
69 | StorageLive(_4); | |
781aab86 | 70 | _4 = function_with_bytes::<&*b"AAAA">() -> [return: bb1, unwind: bb21]; |
064997fb FG |
71 | } |
72 | ||
73 | bb1: { | |
fe692bf9 FG |
74 | _3 = &_4; |
75 | StorageLive(_5); | |
76 | StorageLive(_6); | |
77 | StorageLive(_7); | |
78 | _7 = [const 65_u8, const 65_u8, const 65_u8, const 65_u8]; | |
79 | _6 = &_7; | |
80 | _5 = &_6; | |
81 | _2 = (move _3, move _5); | |
82 | StorageDead(_5); | |
83 | StorageDead(_3); | |
ed00b5ec | 84 | PlaceMention(_2); |
fe692bf9 FG |
85 | StorageLive(_8); |
86 | _8 = (_2.0: &&[u8]); | |
87 | StorageLive(_9); | |
88 | _9 = (_2.1: &&[u8; 4]); | |
89 | StorageLive(_10); | |
90 | StorageLive(_11); | |
781aab86 | 91 | _11 = &(*_8); |
fe692bf9 | 92 | StorageLive(_12); |
781aab86 FG |
93 | _12 = &(*_9); |
94 | _10 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _11, move _12) -> [return: bb2, unwind: bb21]; | |
064997fb FG |
95 | } |
96 | ||
97 | bb2: { | |
fe692bf9 | 98 | switchInt(move _10) -> [0: bb4, otherwise: bb3]; |
064997fb FG |
99 | } |
100 | ||
101 | bb3: { | |
781aab86 FG |
102 | StorageDead(_12); |
103 | StorageDead(_11); | |
104 | goto -> bb8; | |
105 | } | |
106 | ||
107 | bb4: { | |
108 | goto -> bb5; | |
109 | } | |
110 | ||
111 | bb5: { | |
112 | StorageDead(_12); | |
113 | StorageDead(_11); | |
114 | StorageLive(_14); | |
115 | _14 = core::panicking::AssertKind::Eq; | |
116 | FakeRead(ForLet(None), _14); | |
fe692bf9 | 117 | StorageLive(_15); |
fe692bf9 | 118 | StorageLive(_16); |
781aab86 | 119 | _16 = move _14; |
fe692bf9 | 120 | StorageLive(_17); |
fe692bf9 | 121 | StorageLive(_18); |
781aab86 FG |
122 | _18 = &(*_8); |
123 | _17 = &(*_18); | |
fe692bf9 | 124 | StorageLive(_19); |
fe692bf9 | 125 | StorageLive(_20); |
781aab86 FG |
126 | _20 = &(*_9); |
127 | _19 = &(*_20); | |
fe692bf9 | 128 | StorageLive(_21); |
781aab86 FG |
129 | _21 = Option::<Arguments<'_>>::None; |
130 | _15 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _16, move _17, move _19, move _21) -> bb21; | |
064997fb FG |
131 | } |
132 | ||
781aab86 | 133 | bb6: { |
fe692bf9 FG |
134 | StorageDead(_21); |
135 | StorageDead(_19); | |
781aab86 | 136 | StorageDead(_17); |
fe692bf9 | 137 | StorageDead(_16); |
781aab86 FG |
138 | StorageDead(_20); |
139 | StorageDead(_18); | |
fe692bf9 | 140 | StorageDead(_15); |
781aab86 | 141 | StorageDead(_14); |
fe692bf9 | 142 | unreachable; |
064997fb FG |
143 | } |
144 | ||
781aab86 FG |
145 | bb7: { |
146 | goto -> bb9; | |
064997fb FG |
147 | } |
148 | ||
781aab86 | 149 | bb8: { |
fe692bf9 | 150 | _1 = const (); |
781aab86 | 151 | goto -> bb9; |
064997fb FG |
152 | } |
153 | ||
781aab86 | 154 | bb9: { |
fe692bf9 FG |
155 | StorageDead(_10); |
156 | StorageDead(_9); | |
157 | StorageDead(_8); | |
781aab86 | 158 | goto -> bb10; |
064997fb FG |
159 | } |
160 | ||
781aab86 | 161 | bb10: { |
fe692bf9 FG |
162 | StorageDead(_7); |
163 | StorageDead(_6); | |
164 | StorageDead(_4); | |
165 | StorageDead(_2); | |
166 | StorageDead(_1); | |
781aab86 | 167 | StorageLive(_22); |
fe692bf9 FG |
168 | StorageLive(_23); |
169 | StorageLive(_24); | |
170 | StorageLive(_25); | |
781aab86 | 171 | _25 = function_with_bytes::<&*b"AAAA">() -> [return: bb11, unwind: bb21]; |
064997fb FG |
172 | } |
173 | ||
781aab86 FG |
174 | bb11: { |
175 | _24 = &_25; | |
176 | StorageLive(_26); | |
fe692bf9 | 177 | StorageLive(_27); |
781aab86 FG |
178 | _27 = const b"AAAA"; |
179 | _26 = &_27; | |
180 | _23 = (move _24, move _26); | |
181 | StorageDead(_26); | |
182 | StorageDead(_24); | |
ed00b5ec | 183 | PlaceMention(_23); |
fe692bf9 | 184 | StorageLive(_28); |
781aab86 | 185 | _28 = (_23.0: &&[u8]); |
fe692bf9 | 186 | StorageLive(_29); |
781aab86 | 187 | _29 = (_23.1: &&[u8; 4]); |
fe692bf9 | 188 | StorageLive(_30); |
fe692bf9 | 189 | StorageLive(_31); |
781aab86 | 190 | _31 = &(*_28); |
fe692bf9 | 191 | StorageLive(_32); |
781aab86 FG |
192 | _32 = &(*_29); |
193 | _30 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _31, move _32) -> [return: bb12, unwind: bb21]; | |
064997fb FG |
194 | } |
195 | ||
781aab86 FG |
196 | bb12: { |
197 | switchInt(move _30) -> [0: bb14, otherwise: bb13]; | |
198 | } | |
199 | ||
200 | bb13: { | |
fe692bf9 | 201 | StorageDead(_32); |
781aab86 FG |
202 | StorageDead(_31); |
203 | goto -> bb18; | |
064997fb FG |
204 | } |
205 | ||
781aab86 FG |
206 | bb14: { |
207 | goto -> bb15; | |
208 | } | |
209 | ||
210 | bb15: { | |
211 | StorageDead(_32); | |
212 | StorageDead(_31); | |
213 | StorageLive(_34); | |
214 | _34 = core::panicking::AssertKind::Eq; | |
215 | FakeRead(ForLet(None), _34); | |
216 | StorageLive(_35); | |
fe692bf9 | 217 | StorageLive(_36); |
781aab86 | 218 | _36 = move _34; |
fe692bf9 FG |
219 | StorageLive(_37); |
220 | StorageLive(_38); | |
781aab86 FG |
221 | _38 = &(*_28); |
222 | _37 = &(*_38); | |
fe692bf9 FG |
223 | StorageLive(_39); |
224 | StorageLive(_40); | |
225 | _40 = &(*_29); | |
226 | _39 = &(*_40); | |
227 | StorageLive(_41); | |
781aab86 FG |
228 | _41 = Option::<Arguments<'_>>::None; |
229 | _35 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _36, move _37, move _39, move _41) -> bb21; | |
064997fb FG |
230 | } |
231 | ||
781aab86 | 232 | bb16: { |
fe692bf9 FG |
233 | StorageDead(_41); |
234 | StorageDead(_39); | |
fe692bf9 FG |
235 | StorageDead(_37); |
236 | StorageDead(_36); | |
781aab86 FG |
237 | StorageDead(_40); |
238 | StorageDead(_38); | |
239 | StorageDead(_35); | |
240 | StorageDead(_34); | |
fe692bf9 | 241 | unreachable; |
064997fb FG |
242 | } |
243 | ||
781aab86 FG |
244 | bb17: { |
245 | goto -> bb19; | |
064997fb FG |
246 | } |
247 | ||
781aab86 FG |
248 | bb18: { |
249 | _22 = const (); | |
250 | goto -> bb19; | |
064997fb FG |
251 | } |
252 | ||
781aab86 | 253 | bb19: { |
fe692bf9 FG |
254 | StorageDead(_30); |
255 | StorageDead(_29); | |
781aab86 FG |
256 | StorageDead(_28); |
257 | goto -> bb20; | |
064997fb FG |
258 | } |
259 | ||
781aab86 FG |
260 | bb20: { |
261 | StorageDead(_27); | |
262 | StorageDead(_25); | |
fe692bf9 | 263 | StorageDead(_23); |
781aab86 | 264 | StorageDead(_22); |
fe692bf9 FG |
265 | _0 = const (); |
266 | return; | |
064997fb FG |
267 | } |
268 | ||
781aab86 | 269 | bb21 (cleanup): { |
fe692bf9 | 270 | resume; |
064997fb FG |
271 | } |
272 | } | |
273 | ||
ed00b5ec | 274 | ALLOC0 (size: 4, align: 1) { |
064997fb FG |
275 | 41 41 41 41 │ AAAA |
276 | } |