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

Parse normal functions with self parameter correctly #2813

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

braw-lee
Copy link
Contributor

@braw-lee braw-lee commented Jan 23, 2024

Fixes #2812
Might use same function to parse normal function and trait functions so should be a useful fix.

Fixes Rust-GCC#2812

gcc/rust/ChangeLog:

	* parse/rust-parse-impl.h (Parser::parse_function):
	Skip token if its a COMMA.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-2812.rs: New test.

Signed-off-by: Kushal Pal <[email protected]>
@braw-lee
Copy link
Contributor Author

braw-lee commented Jan 26, 2024

will need this soon for #2815 @P-E-P @CohenArthur

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.

Great stuff, thank you :)

@CohenArthur CohenArthur added this pull request to the merge queue Jan 26, 2024
Merged via the queue into Rust-GCC:master with commit bef4967 Jan 26, 2024
9 checks passed
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.

Parser cannot handle normal functions with self parameter
2 participants