bors
1bc56185ee
Auto merge of #139430 - scottmcm:polymorphic-array-into-iter, r=cuviper
...
Polymorphize `array::IntoIter`'s iterator impl
Today we emit all the iterator methods for every different array width. That's wasteful since the actual array length never even comes into it -- the indices used are from the separate `alive: IndexRange` field, not even the `N` const param.
This PR switches things so that an `array::IntoIter<T, N>` stores a `PolymorphicIter<[MaybeUninit<T>; N]>`, which we *unsize* to `PolymorphicIter<[MaybeUninit<T>]>` and call methods on that non-`Sized` type for all the iterator methods.
That also necessarily makes the layout consistent between the different lengths of arrays, because of the unsizing. Compare that to today <https://rust.godbolt.org/z/Prb4xMPrb >, where different widths can't even be deduped because the offset to the indices is different for different array widths.
2025-04-11 23:21:31 +00:00
..
2025-03-19 19:45:46 +01:00
2025-04-07 07:11:52 -04:00
2024-05-31 15:56:43 +10:00
2025-04-06 21:41:47 +02:00
2024-12-15 19:01:45 +08:00
2025-04-05 11:44:38 -07:00
2024-10-31 18:20:11 +08:00
2025-02-11 13:41:35 -08:00
2024-12-19 20:36:51 +08:00
2025-04-05 11:44:38 -07:00
2024-05-31 15:56:43 +10:00
2025-04-07 18:12:06 -07:00
2025-04-07 16:53:11 -03:00
2025-04-04 16:13:57 -07:00
2025-02-11 13:41:35 -08:00
2024-12-11 21:34:48 +11:00
2025-04-06 21:41:47 +02:00
2025-04-11 23:21:31 +00:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2025-02-24 09:26:54 +00:00
2024-12-19 20:36:51 +08:00
2025-03-11 00:27:32 +01:00
2024-05-31 15:56:43 +10:00
2024-06-25 19:00:02 +02:00
2025-03-28 09:19:57 +00:00
2025-02-24 09:26:54 +00:00
2025-02-24 09:26:54 +00:00
2025-04-05 04:05:04 +00:00
2025-04-11 10:53:45 +00:00
2025-02-27 12:22:59 +01:00
2024-06-19 13:54:55 +01:00
2025-02-24 09:26:54 +00:00
2025-02-24 09:26:54 +00:00
2025-02-24 09:26:54 +00:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-24 09:26:54 +00:00
2025-02-24 09:26:54 +00:00
2025-02-24 09:26:54 +00:00
2024-05-31 15:56:43 +10:00
2025-02-24 09:26:54 +00:00
2025-02-18 16:11:41 +01:00
2025-01-30 11:22:46 +01:00
2024-05-31 15:56:43 +10:00
2025-02-16 18:37:50 +01:00
2025-02-16 18:37:50 +01:00
2025-02-16 18:37:50 +01:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-03-17 14:08:09 +00:00
2025-02-10 21:38:44 +01:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-08-10 10:44:24 +08:00
2024-04-11 21:42:35 -04:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-04-11 17:20:08 +00:00
2025-03-21 17:34:45 -07:00
2025-04-10 09:56:37 +02:00
2025-04-10 09:56:37 +02:00
2025-04-11 09:57:21 +02:00
2025-04-10 09:56:37 +02:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-01-31 22:29:08 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-01-26 03:48:27 -05:00
2025-03-17 14:08:09 +00:00
2025-04-05 11:44:38 -07:00
2025-02-11 13:41:35 -08:00
2025-04-05 11:44:38 -07:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-03-06 21:38:39 +01:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-04-03 21:59:43 +08:00
2024-07-25 15:14:42 -04:00
2024-05-31 15:56:43 +10:00
2024-08-07 14:08:34 +02:00
2025-02-14 18:55:50 +00:00
2025-02-17 16:36:14 -08:00
2025-03-06 22:29:05 +08:00
2024-10-23 04:42:03 +02:00
2024-04-24 13:12:33 +01:00
2025-03-28 09:19:57 +00:00
2024-09-09 19:39:43 -07:00
2024-09-21 01:07:00 -04:00
2024-06-04 01:30:51 -07:00
2024-05-31 15:56:43 +10:00
2025-04-10 09:56:37 +02:00
2025-03-17 14:08:09 +00:00
2025-02-03 10:39:32 -05:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-03-28 09:19:57 +00:00
2025-02-11 13:41:35 -08:00
2025-04-10 09:56:37 +02:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2024-10-11 08:43:27 +11:00
2024-06-05 15:40:11 +00:00
2025-04-05 11:44:38 -07:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-04-06 21:41:47 +02:00
2025-04-06 21:41:47 +02:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-03-28 09:19:57 +00:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2025-04-04 16:13:57 -07:00
2024-03-11 09:36:35 -07:00
2024-06-23 00:40:43 -07:00
2025-02-03 10:39:32 -05:00
2024-05-31 15:56:43 +10:00
2025-02-24 09:26:54 +00:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2025-01-21 06:59:15 -07:00
2024-07-14 13:48:29 +03:00
2025-02-19 15:15:29 +01:00
2025-02-24 09:26:54 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-19 08:41:19 +01:00
2025-04-10 09:56:37 +02:00
2024-03-22 09:55:50 -04:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-04-10 09:56:37 +02:00
2025-03-06 22:29:05 +08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-04-06 21:41:47 +02:00
2025-02-11 13:41:35 -08:00
2024-09-18 13:53:31 -07:00
2025-03-17 14:08:09 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-03-28 09:19:57 +00:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-07-14 13:48:29 +03:00
2025-02-11 13:41:35 -08:00
2025-03-12 00:56:43 -07:00
2025-02-11 13:41:35 -08:00
2024-12-10 01:29:43 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-01-10 22:53:54 +01:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-12-10 21:41:05 +01:00
2024-09-21 01:07:00 -04:00
2024-05-31 15:56:43 +10:00
2025-02-24 09:26:54 +00:00
2024-04-04 21:59:08 +01:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-07-14 13:48:29 +03:00
2025-02-11 13:41:35 -08:00
2025-01-23 17:19:53 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-23 21:23:36 +08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-03-06 10:50:23 +00:00
2025-02-11 13:41:35 -08:00
2024-06-14 13:31:46 +10:00
2024-06-14 13:31:46 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2024-05-31 15:56:43 +10:00
2025-02-19 11:32:32 +01:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-04-05 11:44:38 -07:00
2025-03-12 22:39:43 -07:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-03-12 19:01:04 -04:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-03-02 18:53:49 +00:00
2025-03-19 19:45:46 +01:00
2025-02-11 13:41:35 -08:00
2025-02-12 23:01:27 -08:00
2025-02-14 22:24:27 -08:00
2025-03-31 22:38:53 +09:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-13 21:26:48 -08:00
2025-02-11 13:41:35 -08:00
2025-03-30 12:45:04 -04:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2025-02-11 13:41:35 -08:00
2025-02-24 09:26:54 +00:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-08-07 00:41:48 -04:00
2025-02-24 09:26:54 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-04-09 13:06:10 +03:00
2025-04-09 09:09:37 -07:00
2025-04-09 10:44:49 -07:00
2025-03-06 19:56:21 +00:00
2025-02-24 09:26:54 +00:00
2025-02-06 18:21:13 +03:00
2025-02-11 13:41:35 -08:00
2025-04-05 11:44:38 -07:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-19 11:36:52 -08:00
2025-04-10 09:56:37 +02:00
2024-05-31 15:56:43 +10:00
2024-10-19 13:09:21 +00:00
2025-02-11 13:41:35 -08:00
2025-04-05 11:44:38 -07:00
2025-02-25 17:46:05 -05:00
2025-03-28 09:19:57 +00:00
2025-03-19 23:57:49 -04:00
2025-02-19 11:36:52 -08:00
2024-06-19 13:54:55 +01:00
2024-06-19 13:54:55 +01:00
2024-06-19 13:54:55 +01:00
2024-09-18 13:53:31 -07:00
2024-09-18 13:53:31 -07:00
2025-02-11 13:41:35 -08:00
2025-04-05 11:44:38 -07:00
2025-02-11 13:41:35 -08:00
2025-03-17 14:08:09 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-03-17 14:08:09 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-27 12:58:18 +08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-06 23:44:23 +01:00
2025-01-28 19:10:26 +03:00
2025-02-11 13:41:35 -08:00
2024-09-09 19:39:43 -07:00