Douglas Creager
c60e590b4c
[ty] Support variable-length tuples in unpacking assignments ( #18948 )
...
This PR updates our unpacking assignment logic to use the new tuple
machinery. As a result, we can now unpack variable-length tuples
correctly.
As part of this, the `TupleSpec` classes have been renamed to `Tuple`,
and can now contain any element (Rust) type, not just `Type<'db>`. The
unpacker uses a tuple of `UnionBuilder`s to maintain the types that will
be assigned to each target, as we iterate through potentially many union
elements on the rhs. We also add a new consuming iterator for tuples,
and update the `all_elements` methods to wrap the result in an enum
(similar to `itertools::Position`) letting you know which part of the
tuple each element appears in. I also added a new
`UnionBuilder::try_build`, which lets you specify a different fallback
type if the union contains no elements.
2025-06-27 15:29:04 -04:00
..
2025-05-30 11:24:20 -04:00
2025-05-21 11:06:27 -04:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-06-27 12:40:33 +00:00
2025-06-02 10:52:26 +00:00
2025-06-02 10:52:26 +00:00
2025-05-19 17:24:25 -04:00
2025-05-19 17:24:25 -04:00
2025-05-19 17:24:25 -04:00
2025-06-19 19:42:31 -07:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-06-24 20:27:37 +00:00
2025-06-24 20:27:37 +00:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-06-09 00:40:05 +01:00
2025-05-21 15:38:56 -04:00
2025-06-09 00:40:05 +01:00
2025-05-13 18:43:19 +02:00
2025-05-21 18:02:39 -04:00
2025-05-21 18:02:39 -04:00
2025-05-16 06:57:26 +02:00
2025-05-22 21:37:03 -04:00
2025-05-15 11:39:14 -04:00
2025-05-15 11:39:14 -04:00
2025-05-14 11:13:41 -04:00
2025-05-14 11:13:41 -04:00
2025-05-14 11:13:41 -04:00
2025-05-14 11:13:41 -04:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-29 23:17:18 +00:00
2025-05-14 08:26:48 +02:00
2025-05-14 08:26:48 +02:00
2025-05-29 23:17:18 +00:00
2025-05-29 23:17:18 +00:00
2025-05-29 23:17:18 +00:00
2025-06-25 20:25:00 +01:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-06-20 08:36:49 +05:30
2025-06-20 08:36:49 +05:30
2025-05-26 21:34:47 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-06-24 18:02:05 -07:00
2025-06-20 08:36:49 +05:30
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-06-27 15:29:04 -04:00
2025-05-19 17:24:25 -04:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-19 17:24:25 -04:00
2025-05-13 18:43:19 +02:00
2025-05-21 11:06:27 -04:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00
2025-05-13 18:43:19 +02:00