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 expression segment parsing #2671

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

P-E-P
Copy link
Member

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

Fixes #2652

  • Fix issue
  • Add test

Generic parsing failed due to some token that had not been split yet.

@P-E-P P-E-P added this to the GCC 14.1 release milestone Oct 10, 2023
@P-E-P P-E-P requested a review from CohenArthur October 10, 2023 08:23
@P-E-P P-E-P self-assigned this Oct 10, 2023
@P-E-P P-E-P marked this pull request as ready for review October 10, 2023 08:23
P-E-P added 2 commits October 10, 2023 10:25
When a token was identified as bit left shift it slipped through the
parser and resulted in an error.

gcc/rust/ChangeLog:

	* parse/rust-parse-impl.h (Parser::parse_path_expr_segment): Accept
	left shift tokens in order to let generic parsing function split the
	token.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
New regression test to highlight behavior of Rust-GCC#2652.

gcc/testsuite/ChangeLog:

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

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
@P-E-P P-E-P force-pushed the fix-expression-segment-parsing branch from e6ebd00 to 1077751 Compare October 10, 2023 08:25
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
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 16, 2023
@CohenArthur CohenArthur added this pull request to the merge queue Oct 17, 2023
Merged via the queue into Rust-GCC:master with commit ba0fb41 Oct 17, 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 expression segment
3 participants