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

Use Literal::subspan to produce better spans from LitStr::parse #621

Open
dtolnay opened this issue Apr 15, 2019 · 1 comment
Open

Use Literal::subspan to produce better spans from LitStr::parse #621

dtolnay opened this issue Apr 15, 2019 · 1 comment

Comments

@dtolnay
Copy link
Owner

dtolnay commented Apr 15, 2019

LitStr::parse currently puts the entire input string's span on every output token. It would be better to try producing smaller spans using Literal::subspan.

@TedDriggs
Copy link
Contributor

I have a suspicion that TedDriggs/darling#120 is somehow related to this, but the symptoms are different.

impl FromMeta for syn::Path is using LitStr::parse here, but when testing this in colin-kiegel/rust-derive-builder#194 breaking the example by commenting out the conversion leads to the error only showing on the last quotation mark.

Is there a good way for me to test this in more detail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants