Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of how primitive integers work vs syn::Index #101

Closed
dtolnay opened this issue Mar 31, 2019 · 0 comments
Closed

Documentation of how primitive integers work vs syn::Index #101

dtolnay opened this issue Mar 31, 2019 · 0 comments

Comments

@dtolnay
Copy link
Owner

dtolnay commented Mar 31, 2019

https://github.com/dtolnay/syn/blob/0.15.29/examples/heapsize/heapsize_derive/src/lib.rs#L75-L83 shows using an integer index to index into a tuple struct, but this could be covered in quote documentation too. Interpolating an integer without syn::Index always includes the integer suffix on the resulting literal.

peterhuene pushed a commit to rtyler/azure-functions-rs that referenced this issue Apr 12, 2019
See dtolnay/quote#101.

This commit fixes the tuple indexing code to use `syn::Index`.

This prevents the generated code from having integral type suffixes, which are
no longer valid for indexing into tuples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant