Ensure all quote! tokens have the default Span#51
Ensure all quote! tokens have the default Span#51alexcrichton wants to merge 1 commit intodtolnay:masterfrom
quote! tokens have the default Span#51Conversation
Apparently `parse` can return some... "flavorful" spans! This resets all spans coming out of `parse` back to that of `Default::default` to ensure that we're spanned correctly. This also just so happens to fix an error I was seeing locally, although I have no idea why.
|
Hm ok thinking on this more this may actually be the right fix I think. I believe the span information coming out is otherwise correct as we're basically stringifying a token at compile time and then parsing it at runtime. The span information points to that token itself (and sort of a source file that just has the one token in it). I think in general the tokens produced by In that sense I'm not entirely sure where else the fix would go? I don't think we'd want to change |
|
Er wait, this fixed one thing locally and broke tons of others, now I have no idea what's going on... Should certainly hold off on merging! |
|
Ok so I made a much longer writeup with my findings here about the use case I was working with. This fix is not enough in that we also needed to use Sorry for the noise! |
Apparently
parsecan return some... "flavorful" spans! This resets allspans coming out of
parseback to that ofDefault::defaultto ensurethat we're spanned correctly. This also just so happens to fix an error
I was seeing locally, although I have no idea why.