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 parser bug on tupplestruct pattern #2646

Merged
merged 2 commits into from
Oct 5, 2023
Merged

Conversation

jdupak
Copy link
Contributor

@jdupak jdupak commented Oct 5, 2023

Fixes #2645

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h: Add missing token consumption

gcc/rust/ChangeLog:

	* parse/rust-parse-impl.h: Add missing token consumption

Signed-off-by: Jakub Dupak <[email protected]>
@jdupak
Copy link
Contributor Author

jdupak commented Oct 5, 2023

New error:

test.rs:1:43: error: failed to resolve TypePath: A in this scope [E0412]
    1 | pub fn struct_tuple(A { 0: a, 1: ref b }: A) -> i32 {
      |                                           ^
test.rs:1:21: error: Cannot find path ‘Ain this scope [E0433]
    1 | pub fn struct_tuple(A { 0: a, 1: ref b }: A) -> i32 {
      |                     ^
(null):0: confused by earlier errors, bailing out

@jdupak
Copy link
Contributor Author

jdupak commented Oct 5, 2023

@CohenArthur

@jdupak
Copy link
Contributor Author

jdupak commented Oct 5, 2023

check-rust passed locally

@P-E-P
Copy link
Member

P-E-P commented Oct 5, 2023

@jdupak Could you had a test ?

@jdupak
Copy link
Contributor Author

jdupak commented Oct 5, 2023

@P-E-P I am not sure, how should the test look like, since the compilation still fails (because unimplemented) in a later stage.

@P-E-P
Copy link
Member

P-E-P commented Oct 5, 2023

@P-E-P I am not sure, how should the test look like, since the compilation still fails (because unimplemented) in a later stage.

You could specify --frust-compile-until to test only the parsing step am I right ?

gcc/testsuite/ChangeLog:

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

Signed-off-by: Jakub Dupak <[email protected]>
@jdupak
Copy link
Contributor Author

jdupak commented Oct 5, 2023

@P-E-P I am not sure, how should the test look like, since the compilation still fails (because unimplemented) in a later stage.

You could specify --frust-compile-until to test only the parsing step am I right ?

Added

@P-E-P P-E-P self-requested a review October 5, 2023 12:59
@P-E-P P-E-P added this to the GCC 14.1 release milestone Oct 5, 2023
@P-E-P P-E-P added this pull request to the merge queue Oct 5, 2023
Merged via the queue into Rust-GCC:master with commit 007166c Oct 5, 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.

Parser bug on tupplestruct index pattern
2 participants