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

force_fallback produce invalid span #274

Closed
zzau13 opened this issue Feb 24, 2021 · 3 comments
Closed

force_fallback produce invalid span #274

zzau13 opened this issue Feb 24, 2021 · 3 comments

Comments

@zzau13
Copy link
Contributor

zzau13 commented Feb 24, 2021

In [email protected], related zzau13/yarte#211

With parse impl of syn::Expr:

ywrite_html!(buf, "{{ @ }}");

works correctly, error is spammed by syn with fallback span.

And for this with Punctuated::parse_terminated:

ywrite_html!(buf, r#"{{> hello_ex my_card body="foo" }}"#);

not works, panic with Invalid span with no related FileInfo!

@dtolnay
Copy link
Owner

dtolnay commented Feb 24, 2021

Would you be able to provide a minimal repro using proc-macro2 only, independent of yarte and syn?

@zzau13
Copy link
Contributor Author

zzau13 commented Feb 25, 2021

It is much more complicated than I expected, I cannot replicate it separately. It will take a little longer.

The implementation is very stable but from the error messages it seems that it operates with both types of Span when it should be forced to fallback.

I will try to reproduce it but it will take a little longer.

@dtolnay
Copy link
Owner

dtolnay commented Mar 29, 2021

I'll close this in the absence of a way to reproduce. Feel free to open a new issue if you nail down what's happening.

@dtolnay dtolnay closed this as completed Mar 29, 2021
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

2 participants