You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under certain conditions, the parser inserts parentheses that do not appear literally in the source code, and this seems to mess up the associated spans.
A small example is attached (print_span.zip). Here are the highlights:
Note that for both parens and no_parens, the parsed output includes parentheses. For parens, the outputted span appears correct. But for no_parens the outputted span is the call site (I think).
Small changes to the source code make the problem go away. For example, swapping the order of parens and no_parens seems to do this.
Under certain conditions, the parser inserts parentheses that do not appear literally in the source code, and this seems to mess up the associated spans.
A small example is attached (print_span.zip). Here are the highlights:
print_span/src/lib.rs
:print_span/example/src/lib.rs
:And here is some sample output:
Note that for both
parens
andno_parens
, the parsed output includes parentheses. Forparens
, the outputted span appears correct. But forno_parens
the outputted span is the call site (I think).Small changes to the source code make the problem go away. For example, swapping the order of
parens
andno_parens
seems to do this.I apologize if this is not a
proc-macro2
problem.The text was updated successfully, but these errors were encountered: