Skip to content

Commit 7914e65

Browse files
committed
Add a note about and alternative
1 parent ba6c758 commit 7914e65

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

text/0000-variadic-generics.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ there is an expression immediately before the ellipsis.
190190
- Implement one of the other variadic designs, such as
191191
[#1582](https://github.com/rust-lang/rfcs/pull/1582) or
192192
[#1921](https://github.com/rust-lang/rfcs/pull/1921)
193+
- Include explicit `Head`, `Tail`, and `Cons<T>` associated types in the `Tuple`
194+
trait. This could allow the above syntax to be implemented purely as sugar.
195+
However, this approach introduces a lot of additional complexity. One of the
196+
complications is that such a trait couldn't be implemented for `()`, so
197+
there would have to be separate `Cons` and `Split` traits, rather than one
198+
unified `Tuple`.
193199

194200
# Unresolved questions
195201
[unresolved]: #unresolved-questions

0 commit comments

Comments
 (0)