Fix some missing syn invisible group handling in FromMeta implementations#263
Conversation
This was supposed to be fixed by c036162 but it looks like this implementation was forgotten.
It's currently named "Unexpected litteral type", but it can also be instantiated when not parsing a litteral, e.g. https://github.com/TedDriggs/darling/blob/224a866727cd9e40c2cd80430852b1ea0deeb40e/core/src/error/mod.rs#L152 This specifically made investigation of TedDriggs#263 more difficult.
2ccf283 to
aecdfec
Compare
TedDriggs
left a comment
There was a problem hiding this comment.
Can you please add some unit tests to src/from_meta that show inputs which rely on this change? That will make it easier to understand the change, and to prevent any future regressions.
It's currently named "Unexpected litteral type", but it can also be instantiated when not parsing a litteral, e.g. https://github.com/TedDriggs/darling/blob/224a866727cd9e40c2cd80430852b1ea0deeb40e/core/src/error/mod.rs#L152 This specifically made investigation of #263 more difficult.
|
As of syn 2.40, syn may generate this invisible token when the input to the darling proc macro (specifically, the attributes) are generated by a |
|
Okay, can you add that as a comment in the source code with each of these changes so that it's clear later why this is going on? |
This was supposed to be fixed by c036162 but it looks like these implementations were forgotten.