impl-trait-for-tuples
impl-trait-for-tuples copied to clipboard
No apparent way to access the tuple size/index as a literal
trafficstars
I find this macro handy for tuple implementations, but have bumped into two related issues:
- Accessing the tuple size as a literal. This is useful if one wants, say, an array of the same size as the elements in the tuple as a type
- Accessing the current tuple index as a literal in a repetition. Basically, the ability to print out 'accessing tuple index N'
Hey, do you have any ideas how the syntax could look for each of them?
If nothing nicer, may be possible to support #length in for_tuples and #index in repetitions.