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 parse mut ref #2678

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Fix parse mut ref #2678

merged 2 commits into from
Oct 16, 2023

Conversation

P-E-P
Copy link
Member

@P-E-P P-E-P commented Oct 11, 2023

Stop nullable expr parsing when there is a comma.

Fixes #2657

P-E-P added 2 commits October 11, 2023 14:32
Add a comma as an expr delimiter, this will allow correct parsing of
match arm expressions.

gcc/rust/ChangeLog:

	* parse/rust-parse-impl.h (Parser::parse_expr): Add comma delimiter.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
This new test highlight the fix for issue Rust-GCC#2657.

gcc/testsuite/ChangeLog:

	* rust/compile/match_break.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
@P-E-P P-E-P added this to the GCC 14.1 release milestone Oct 11, 2023
@P-E-P P-E-P requested a review from CohenArthur October 11, 2023 12:42
@P-E-P P-E-P self-assigned this Oct 11, 2023
@P-E-P P-E-P marked this pull request as ready for review October 11, 2023 12:42
Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philberty philberty added this pull request to the merge queue Oct 16, 2023
Merged via the queue into Rust-GCC:master with commit 9ddb362 Oct 16, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Cannot parse mut ref
2 participants