@@ -7,19 +7,90 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
77 let mut _11: std:: slice:: Iter < ' _ , T > ;
88 let mut _12: std:: iter:: Rev < std:: slice:: Iter < ' _ , T > > ;
99 let mut _13: std:: iter:: Rev < std:: slice:: Iter < ' _ , T > > ;
10- let mut _15: std:: option:: Option < & T > ;
11- let mut _16: isize ;
12- let mut _18: & impl Fn ( & T ) ;
13- let mut _19: ( & T , ) ;
14- let _20: ( ) ;
10+ let mut _37: std:: option:: Option < & T > ;
11+ let mut _39: & impl Fn ( & T ) ;
12+ let mut _40: ( & T , ) ;
13+ let _41: ( ) ;
1514 scope 1 {
1615 debug iter => _13;
17- let _17 : & T ;
16+ let _38 : & T ;
1817 scope 2 {
19- debug x => _17 ;
18+ debug x => _38 ;
2019 }
2120 scope 17 ( inlined <Rev <std:: slice:: Iter <' _, T >> as Iterator >:: next) {
22- let mut _14: & mut std:: slice:: Iter < ' _ , T > ;
21+ scope 18 ( inlined <std:: slice:: Iter <' _, T > as DoubleEndedIterator >:: next_back) {
22+ let mut _14: * const * const T ;
23+ let mut _15: * const std:: ptr:: NonNull < T > ;
24+ let mut _20: bool ;
25+ let mut _21: * const T ;
26+ let _36: & T ;
27+ scope 19 {
28+ let _16 : std:: ptr:: NonNull <T >;
29+ let _22: usize;
30+ scope 20 {
31+ }
32+ scope 21 {
33+ scope 25 ( inlined <NonNull <T > as PartialEq >:: eq) {
34+ let mut _17: std:: ptr:: NonNull < T > ;
35+ scope 26 ( inlined NonNull :: < T > :: as_ptr) {
36+ let mut _18: * const T ;
37+ }
38+ scope 27 ( inlined NonNull :: < T > :: as_ptr) {
39+ let mut _19: * const T ;
40+ }
41+ }
42+ }
43+ scope 22 ( inlined std:: ptr:: const_ptr:: < impl * const T > :: addr) {
44+ scope 23 ( inlined std:: ptr:: const_ptr:: < impl * const T > :: cast :: < ( ) > ) {
45+ }
46+ }
47+ scope 24 ( inlined std:: ptr:: const_ptr:: < impl * const * const T > :: cast :: < NonNull < T > > ) {
48+ }
49+ }
50+ scope 28 ( inlined std:: slice:: Iter :: < ' _ , T > :: next_back_unchecked) {
51+ let _29: std:: ptr:: NonNull < T > ;
52+ scope 29 ( inlined std:: slice:: Iter :: < ' _ , T > :: pre_dec_end) {
53+ let mut _23: * mut * const T ;
54+ let mut _24: * mut std:: ptr:: NonNull < T > ;
55+ let mut _25: std:: ptr:: NonNull < T > ;
56+ let mut _28: std:: ptr:: NonNull < T > ;
57+ let mut _30: * mut * const T ;
58+ let mut _31: * mut usize ;
59+ let mut _32: usize ;
60+ let mut _33: usize ;
61+ scope 30 {
62+ scope 31 {
63+ }
64+ scope 32 {
65+ scope 35 ( inlined NonNull :: < T > :: sub) {
66+ scope 36 ( inlined core:: num:: <impl isize >:: unchecked_neg) {
67+ scope 37 ( inlined core:: ub_checks:: check_language_ub) {
68+ scope 38 ( inlined core:: ub_checks:: check_language_ub:: runtime) {
69+ }
70+ }
71+ }
72+ scope 39 ( inlined NonNull :: < T > :: offset) {
73+ let mut _26: * const T ;
74+ let mut _27: * const T ;
75+ }
76+ }
77+ }
78+ scope 33 ( inlined std:: ptr:: mut_ptr:: < impl * mut * const T > :: cast :: < usize > ) {
79+ }
80+ scope 34 ( inlined std:: ptr:: mut_ptr:: < impl * mut * const T > :: cast :: < NonNull < T > > ) {
81+ }
82+ }
83+ }
84+ scope 40 ( inlined NonNull :: < T > :: as_ref :: < ' _ > ) {
85+ let mut _34: std:: ptr:: NonNull < T > ;
86+ scope 41 ( inlined NonNull :: < T > :: as_ptr) {
87+ let mut _35: * const T ;
88+ }
89+ scope 42 ( inlined std:: ptr:: mut_ptr:: < impl * mut T > :: cast_const) {
90+ }
91+ }
92+ }
93+ }
2394 }
2495 }
2596 scope 3 ( inlined core:: slice:: < impl [ T ] > :: iter) {
@@ -107,45 +178,147 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
107178 }
108179
109180 bb4 : {
110- StorageLive ( _15) ;
111- StorageLive ( _14) ;
112- _14 = & mut ( _13. 0 : std :: slice:: Iter <' _, T >) ;
113- _15 = <std:: slice:: Iter < ' _ , T > as DoubleEndedIterator >:: next_back ( move _14) -> [ return : bb5, unwind unreachable] ;
181+ StorageLive ( _37) ;
182+ StorageLive ( _22) ;
183+ StorageLive ( _21) ;
184+ StorageLive ( _16) ;
185+ StorageLive ( _36) ;
186+ StorageLive ( _20) ;
187+ switchInt ( const <T as std:: mem:: SizedTypeProperties >:: IS_ZST ) -> [ 0 : bb5, otherwise: bb6] ;
114188 }
115189
116190 bb5 : {
191+ StorageLive ( _15) ;
192+ StorageLive ( _14) ;
193+ _14 = & raw const ( ( _13. 0 : std :: slice:: Iter <' _, T >) . 1 : * const T ) ;
194+ _15 = _14 as * const std:: ptr:: NonNull < T > ( PtrToPtr ) ;
117195 StorageDead ( _14) ;
118- _16 = discriminant ( _15) ;
119- switchInt ( move _16) -> [ 0 : bb6, 1 : bb8, otherwise: bb10] ;
196+ _16 = ( * _15) ;
197+ StorageDead ( _15) ;
198+ StorageLive ( _18) ;
199+ StorageLive ( _19) ;
200+ StorageLive ( _17) ;
201+ _17 = ( ( _13. 0 : std :: slice:: Iter <' _, T >) . 0 : std :: ptr:: NonNull <T >) ;
202+ _18 = ( _17. 0 : * const T ) ;
203+ StorageDead ( _17) ;
204+ _19 = ( _16. 0 : * const T ) ;
205+ _20 = Eq ( _18, _19) ;
206+ StorageDead ( _19) ;
207+ StorageDead ( _18) ;
208+ goto -> bb7;
120209 }
121210
122211 bb6: {
123- StorageDead ( _15) ;
124- StorageDead ( _13) ;
125- drop ( _2) -> [ return : bb7, unwind unreachable] ;
212+ _21 = ( ( _13. 0 : std :: slice:: Iter <' _, T >) . 1 : * const T ) ;
213+ _22 = _21 as usize ( Transmute ) ;
214+ _20 = Eq ( _22, const 0_usize ) ;
215+ goto -> bb7;
126216 }
127217
128218 bb7 : {
129- return ;
219+ switchInt ( move _20 ) -> [ 0 : bb8 , otherwise : bb16 ] ;
130220 }
131221
132222 bb8 : {
133- _17 = ( ( _15 as Some ) . 0 : & T ) ;
134- StorageLive ( _18) ;
135- _18 = & _2;
136- StorageLive ( _19) ;
137- _19 = ( _17, ) ;
138- _20 = <impl Fn ( & T ) as Fn < ( & T , ) > >:: call ( move _18, move _19) -> [ return : bb9, unwind unreachable] ;
223+ StorageLive ( _35) ;
224+ StorageLive ( _29) ;
225+ StorageLive ( _31) ;
226+ StorageLive ( _24) ;
227+ switchInt ( const <T as std:: mem:: SizedTypeProperties >:: IS_ZST ) -> [ 0 : bb9, otherwise: bb13] ;
139228 }
140229
141230 bb9 : {
142- StorageDead ( _19) ;
143- StorageDead ( _18) ;
144- StorageDead ( _15) ;
145- goto -> bb4;
231+ StorageLive ( _23) ;
232+ _23 = & raw mut ( ( _13. 0 : std :: slice:: Iter <' _, T >) . 1 : * const T ) ;
233+ _24 = _23 as * mut std:: ptr:: NonNull < T > ( PtrToPtr ) ;
234+ StorageDead ( _23) ;
235+ StorageLive ( _28) ;
236+ _25 = ( * _24) ;
237+ switchInt ( const <T as std:: mem:: SizedTypeProperties >:: IS_ZST ) -> [ 0 : bb10, otherwise: bb11] ;
146238 }
147239
148240 bb10 : {
149- unreachable;
241+ StorageLive ( _27) ;
242+ StorageLive ( _26) ;
243+ _26 = ( _25. 0 : * const T ) ;
244+ _27 = Offset ( move _26, const -1_isize ) ;
245+ StorageDead ( _26) ;
246+ _28 = NonNull :: < T > { pointer : move _27 } ;
247+ StorageDead ( _27) ;
248+ goto -> bb12;
249+ }
250+
251+ bb11: {
252+ _28 = _25;
253+ goto -> bb12;
254+ }
255+
256+ bb12 : {
257+ ( * _24) = move _28;
258+ StorageDead ( _28) ;
259+ _29 = ( * _24) ;
260+ goto -> bb14;
261+ }
262+
263+ bb13 : {
264+ StorageLive ( _30) ;
265+ _30 = & raw mut ( ( _13. 0 : std :: slice:: Iter <' _, T >) . 1 : * const T ) ;
266+ _31 = _30 as * mut usize ( PtrToPtr ) ;
267+ StorageDead ( _30) ;
268+ StorageLive ( _33) ;
269+ StorageLive ( _32) ;
270+ _32 = ( * _31) ;
271+ _33 = SubUnchecked ( move _32, const 1_usize ) ;
272+ StorageDead ( _32) ;
273+ ( * _31) = move _33;
274+ StorageDead ( _33) ;
275+ _29 = ( ( _13. 0 : std :: slice:: Iter <' _, T >) . 0 : std :: ptr:: NonNull <T >) ;
276+ goto -> bb14;
277+ }
278+
279+ bb14 : {
280+ StorageDead ( _24) ;
281+ StorageDead ( _31) ;
282+ StorageLive ( _34) ;
283+ _34 = _29;
284+ _35 = ( _34. 0 : * const T ) ;
285+ StorageDead ( _34) ;
286+ _36 = & ( * _35) ;
287+ StorageDead ( _29) ;
288+ StorageDead ( _35) ;
289+ _37 = Option :: < & T > :: Some ( _36) ;
290+ StorageDead ( _20) ;
291+ StorageDead ( _36) ;
292+ StorageDead ( _16) ;
293+ StorageDead ( _21) ;
294+ StorageDead ( _22) ;
295+ _38 = ( ( _37 as Some ) . 0 : & T ) ;
296+ StorageLive ( _39) ;
297+ _39 = & _2;
298+ StorageLive ( _40) ;
299+ _40 = ( _38, ) ;
300+ _41 = <impl Fn ( & T ) as Fn < ( & T , ) > >:: call ( move _39, move _40) -> [ return : bb15, unwind unreachable] ;
301+ }
302+
303+ bb15 : {
304+ StorageDead ( _40) ;
305+ StorageDead ( _39) ;
306+ StorageDead ( _37) ;
307+ goto -> bb4;
308+ }
309+
310+ bb16 : {
311+ StorageDead ( _20) ;
312+ StorageDead ( _36) ;
313+ StorageDead ( _16) ;
314+ StorageDead ( _21) ;
315+ StorageDead ( _22) ;
316+ StorageDead ( _37) ;
317+ StorageDead ( _13) ;
318+ drop ( _2) -> [ return : bb17, unwind unreachable] ;
319+ }
320+
321+ bb17 : {
322+ return;
150323 }
151324}
0 commit comments