Make syn2 and syn3 not mutually exclusive - #29
Closed
datdenkikniet wants to merge 3 commits into
Closed
Conversation
`syn2::Ident` and `syn3::Ident` are both re-exports of `proc_macro2::Ident`, so testing whether type inference works correctly with them does not make a lot of sense: both blanket impls cover that type.
datdenkikniet
marked this pull request as draft
August 26, 2026 07:29
datdenkikniet
marked this pull request as ready for review
August 26, 2026 07:33
Author
|
OK, I've double-checked and it seems that
|
Author
|
On further thought, this PR is a terrible fit: it just works around a fairly fundamental problem that I don't think can or should be remedied without implementing solution 3 that I propose above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a (bad) attempt at fixing #28.
The thing that makes fixing this tricky is that
syn2::parse::Parseandsyn3::parse::Parsehave overlapping implementations (e.g. both are implementedproc_macro2::Ident).I don't really understand the
manyhowinternals, so am having a hard time figuring out which types$ncan actually have in__macro_handler(is it a restricted set? Or are allsyn2::parse::Parse/syn3::parse::Parsefair game?). If it is a restricted set, we should be able to definitively state whether this change is breaking: iff$ncan be of a type that implements bothsyn2::parse::Parseandsyn3::parse::Parse, this solution will not work.ETA: it seems that this passes CI (see: datdenkikniet#1), so am un-drafting it.