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 global path parsing #2668

Merged
merged 3 commits into from
Oct 16, 2023
Merged

Conversation

P-E-P
Copy link
Member

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

A dispatching function missed a case with opening scole resolution.

  • Fix issue
  • Add test

Fixes #2649

P-E-P added 2 commits October 9, 2023 13:07
This will ensure an accurate representation of the token. Also update the
as_string function to represent accurately scope resolution tokens.

gcc/rust/ChangeLog:

	* lex/rust-token.cc (Token::as_string): Update function to output scope
	resolution tokens correctly.
	* parse/rust-parse-impl.h (Parser::parse_generic_param): Change call to
	as_string.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
The function parsing type param bounds had a problem with scope
resolution opening token.

gcc/rust/ChangeLog:

	* parse/rust-parse-impl.h (Parser::parse_type_param_bound): Add missing
	case for lifetime switch.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
@P-E-P P-E-P added this to the GCC 14.1 release milestone Oct 9, 2023
@P-E-P P-E-P self-assigned this Oct 9, 2023
@P-E-P P-E-P requested a review from CohenArthur October 9, 2023 13:11
@P-E-P P-E-P marked this pull request as ready for review October 9, 2023 13:12
@P-E-P P-E-P marked this pull request as draft October 9, 2023 15:34
Add a new test to highlight fix for Rust-GCC#2649.

gcc/testsuite/ChangeLog:

	* rust/compile/parse_global_path_generic.rs: New test.
@P-E-P P-E-P marked this pull request as ready for review October 10, 2023 08:42
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

nice find, thanks!

@CohenArthur CohenArthur 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 16, 2023
Merged via the queue into Rust-GCC:master with commit 522528b 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.

Global path parsing
2 participants