|
12 | 12 | let mut _10: std::boxed::Box<()>; |
13 | 13 | let mut _11: *const (); |
14 | 14 | let mut _14: usize; |
15 | | - let mut _15: usize; |
16 | | - let mut _24: usize; |
17 | 15 | scope 1 { |
18 | 16 | debug vp_ctx => _1; |
19 | 17 | let _5: *const (); |
|
26 | 24 | scope 4 { |
27 | 25 | debug _x => _8; |
28 | 26 | } |
29 | | - scope 20 (inlined foo) { |
30 | | - let mut _25: *const [()]; |
| 27 | + scope 9 (inlined foo) { |
| 28 | + let mut _15: *const [()]; |
31 | 29 | } |
32 | 30 | } |
33 | | - scope 18 (inlined slice_from_raw_parts::<()>) { |
34 | | - scope 19 (inlined std::ptr::from_raw_parts::<[()], ()>) { |
| 31 | + scope 7 (inlined slice_from_raw_parts::<()>) { |
| 32 | + scope 8 (inlined std::ptr::from_raw_parts::<[()], ()>) { |
35 | 33 | } |
36 | 34 | } |
37 | 35 | } |
|
41 | 39 | let mut _13: *mut u8; |
42 | 40 | scope 6 { |
43 | 41 | } |
44 | | - scope 7 (inlined boxed::box_new_uninit) { |
45 | | - let _16: std::alloc::Layout; |
46 | | - let mut _17: std::result::Result<std::ptr::NonNull<[u8]>, std::alloc::AllocError>; |
47 | | - let mut _18: isize; |
48 | | - let mut _20: !; |
49 | | - scope 8 { |
50 | | - let _19: std::ptr::NonNull<[u8]>; |
51 | | - scope 9 { |
52 | | - scope 13 (inlined NonNull::<[u8]>::as_mut_ptr) { |
53 | | - scope 14 (inlined NonNull::<[u8]>::as_non_null_ptr) { |
54 | | - scope 15 (inlined NonNull::<[u8]>::cast::<u8>) { |
55 | | - let mut _23: *mut [u8]; |
56 | | - scope 16 (inlined NonNull::<[u8]>::as_ptr) { |
57 | | - } |
58 | | - } |
59 | | - } |
60 | | - scope 17 (inlined NonNull::<u8>::as_ptr) { |
61 | | - } |
62 | | - } |
63 | | - } |
64 | | - scope 11 (inlined <std::alloc::Global as Allocator>::allocate) { |
65 | | - scope 12 (inlined std::alloc::Global::alloc_impl) { |
66 | | - } |
67 | | - } |
68 | | - } |
69 | | - scope 10 (inlined #[track_caller] Layout::from_size_align_unchecked) { |
70 | | - let _21: (); |
71 | | - let mut _22: std::ptr::Alignment; |
72 | | - } |
73 | | - } |
74 | 42 | } |
75 | 43 |
|
76 | 44 | bb0: { |
|
82 | 50 | + _4 = const (); |
83 | 51 | StorageLive(_12); |
84 | 52 | StorageLive(_13); |
85 | | - StorageLive(_14); |
86 | | -- _14 = const <() as std::mem::SizedTypeProperties>::SIZE; |
87 | | -+ _14 = const 0_usize; |
88 | | - StorageLive(_15); |
89 | | -- _15 = const <() as std::mem::SizedTypeProperties>::ALIGN; |
90 | | -+ _15 = const 1_usize; |
91 | | - StorageLive(_16); |
92 | | - StorageLive(_18); |
93 | | - StorageLive(_19); |
94 | | - StorageLive(_20); |
95 | | - StorageLive(_21); |
96 | | - switchInt(UbChecks) -> [0: bb6, otherwise: bb5]; |
| 53 | + _13 = boxed::box_new_uninit(const <() as std::mem::SizedTypeProperties>::LAYOUT) -> [return: bb2, unwind unreachable]; |
97 | 54 | } |
98 | 55 |
|
99 | 56 | bb1: { |
|
103 | 60 | } |
104 | 61 |
|
105 | 62 | bb2: { |
106 | | - unreachable; |
107 | | - } |
108 | | - |
109 | | - bb3: { |
110 | | -- _20 = handle_alloc_error(move _16) -> unwind unreachable; |
111 | | -+ _20 = handle_alloc_error(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}) -> unwind unreachable; |
112 | | - } |
113 | | - |
114 | | - bb4: { |
115 | | - _19 = copy ((_17 as Ok).0: std::ptr::NonNull<[u8]>); |
116 | | -- StorageLive(_23); |
117 | | -+ nop; |
118 | | - _23 = copy _19 as *mut [u8] (Transmute); |
119 | | - _13 = copy _23 as *mut u8 (PtrToPtr); |
120 | | -- StorageDead(_23); |
121 | | -+ nop; |
122 | | - StorageDead(_17); |
123 | | - StorageDead(_21); |
124 | | - StorageDead(_20); |
125 | | - StorageDead(_19); |
126 | | - StorageDead(_18); |
127 | | - StorageDead(_16); |
128 | | - StorageDead(_15); |
129 | | - StorageDead(_14); |
130 | | -- _12 = copy _13 as *mut () (PtrToPtr); |
| 63 | + _12 = copy _13 as *mut () (PtrToPtr); |
131 | 64 | - (*_12) = move _4; |
132 | | -+ _12 = copy _23 as *mut () (PtrToPtr); |
133 | 65 | + (*_12) = const (); |
134 | 66 | _3 = copy _13 as std::boxed::Box<()> (Transmute); |
135 | 67 | StorageDead(_13); |
|
147 | 79 | + nop; |
148 | 80 | StorageLive(_7); |
149 | 81 | _7 = copy _5; |
150 | | - StorageLive(_24); |
151 | | - _24 = const 1_usize; |
152 | | -- _6 = *const [()] from (copy _7, copy _24); |
| 82 | + StorageLive(_14); |
| 83 | + _14 = const 1_usize; |
| 84 | +- _6 = *const [()] from (copy _7, copy _14); |
153 | 85 | + _6 = *const [()] from (copy _5, const 1_usize); |
154 | | - StorageDead(_24); |
| 86 | + StorageDead(_14); |
155 | 87 | StorageDead(_7); |
156 | 88 | StorageLive(_8); |
157 | 89 | StorageLive(_9); |
158 | 90 | _9 = copy _6; |
159 | | - StorageLive(_25); |
160 | | -- _25 = copy _9; |
| 91 | + StorageLive(_15); |
| 92 | +- _15 = copy _9; |
161 | 93 | - _8 = copy _9 as *mut () (PtrToPtr); |
162 | | -+ _25 = copy _6; |
| 94 | ++ _15 = copy _6; |
163 | 95 | + _8 = copy _5 as *mut () (PtrToPtr); |
164 | | - StorageDead(_25); |
| 96 | + StorageDead(_15); |
165 | 97 | StorageDead(_9); |
166 | 98 | _0 = const (); |
167 | 99 | StorageDead(_8); |
|
171 | 103 | + nop; |
172 | 104 | drop(_3) -> [return: bb1, unwind unreachable]; |
173 | 105 | } |
174 | | - |
175 | | - bb5: { |
176 | | -- _21 = Layout::from_size_align_unchecked::precondition_check(copy _14, copy _15) -> [return: bb6, unwind unreachable]; |
177 | | -+ _21 = Layout::from_size_align_unchecked::precondition_check(const 0_usize, const 1_usize) -> [return: bb6, unwind unreachable]; |
178 | | - } |
179 | | - |
180 | | - bb6: { |
181 | | - StorageLive(_22); |
182 | | -- _22 = copy _15 as std::ptr::Alignment (Transmute); |
183 | | -- _16 = Layout { size: copy _14, align: move _22 }; |
184 | | -+ _22 = const std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }}; |
185 | | -+ _16 = const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}; |
186 | | - StorageDead(_22); |
187 | | - StorageLive(_17); |
188 | | -- _17 = std::alloc::Global::alloc_impl_runtime(copy _16, const false) -> [return: bb7, unwind unreachable]; |
189 | | -+ _17 = std::alloc::Global::alloc_impl_runtime(const Layout {{ size: 0_usize, align: std::ptr::Alignment {{ _inner_repr_trick: std::ptr::alignment::AlignmentEnum::_Align1Shl0 }} }}, const false) -> [return: bb7, unwind unreachable]; |
190 | | - } |
191 | | - |
192 | | - bb7: { |
193 | | - _18 = discriminant(_17); |
194 | | - switchInt(move _18) -> [0: bb4, 1: bb3, otherwise: bb2]; |
195 | | - } |
196 | | -+ } |
197 | | -+ |
198 | | -+ ALLOC0 (size: 8, align: 4) { |
199 | | -+ 01 00 00 00 00 00 00 00 │ ........ |
200 | 106 | } |
201 | 107 |
|
0 commit comments