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

Fix parsing of path type wrapped in a None-delimited group #944

Merged
merged 1 commit into from
Dec 20, 2020

Conversation

Aaron1011
Copy link
Contributor

@Aaron1011 Aaron1011 commented Dec 12, 2020

Previously, peek2 was used to check for :: or < following a
None-delimited group. However, peek2 will look inside a
None-delimited group, so this code would treat input like
{{ Vec<u8> }} as having an angle bracket after the None-delimited
group.

We now consume the None-delimited group by parsing it, and then use
peek to check for tokens that occur after the None-delimited
group.

Previously, `peek2` was used to check for `::` or `<` following a
`None`-delimited group. However, `peek2` will look *inside*` a
`None`-delimited group, so this code would treat input like
`{{ Vec<u8> }}` as having an angle bracket *after* the `None`-delimited
group.

We now consume the `None`-delimited group by parsing it, and then use
`peek` to check for tokens that occur *after* the `None`-delimited
group.
@Aaron1011
Copy link
Contributor Author

@dtolnay Are there any changes that you'd like me to make?

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.

2 participants