Quote: how to remove type suffix after a number

I'm generate some code to indexing tuples, for example:

let id = 1u32;
quote! { tuple.#id); });

the generated code is tuple.1u32, which will reject by compiler:

warning: suffixes on a tuple index are invalid

So is there any way I can remove the type suffix when quoting?

Tuples aren't indexed by integer literals, they are indexed by Index literals.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.