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

Upgrade to syn 2.0 #55

Merged
merged 1 commit into from
Jul 5, 2023
Merged

Upgrade to syn 2.0 #55

merged 1 commit into from
Jul 5, 2023

Conversation

ruifengx
Copy link
Contributor

@ruifengx ruifengx commented Jul 5, 2023

Upgrade the dependency syn to 2.0.

The major changes in syn 2.0 related to this crate:

The first is trivial to handle. The parentheses of attributes are now dealt with by Attribute::parse_args, so I removed the parsing for parentheses in CallMethodAttribute, IntoAttribute, etc. The second one is more tricky, because await is now considered a keyword and #[await(true)] is rejected by Attribute::parse_outer. I had to duplicate the relevant parsing functions from syn and make a tolerant variation (see tolerant_outer_attributes in lib.rs).

All the tests pass, and there should not be any breaking changes.

@Kobzol
Copy link
Owner

Kobzol commented Jul 5, 2023

Hi, thanks a lot! I was also thinking about this, but I was worried that the switch could break something so I didn't rush into it 😅 Also thanks for some of the typo/wrong error message fixes.

@Kobzol Kobzol merged commit 2f50927 into Kobzol:main Jul 5, 2023
3 checks passed
@goffrie goffrie mentioned this pull request Dec 4, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants