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

[E0532] Pattern arm did not match expected kind. #2563

Merged
merged 1 commit into from
Sep 3, 2023

Conversation

MahadMuhammad
Copy link
Contributor

Expected tuple or struct variant found function - E0532

Code Tested:

~/gccrs/gcc/testsuite/rust/compile/issue-2029.rs:8:9: error: expected tuple struct or tuple variant, found function ‘fn (_ usize,) -> Foo{Foo (0:bool)}[E0532]
    8 |         foo(x)
      |         ^~~
      |         a tuple struct with a similar name exists

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Added rich location & error code.

gcc/testsuite/ChangeLog:

* rust/compile/issue-2029.rs: Updated for dejagnu testcase.

gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
	Added error code.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-2029.rs:
	Updated for dejagnu testcase.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
@philberty philberty added this pull request to the merge queue Sep 3, 2023
Merged via the queue into Rust-GCC:master with commit 699f525 Sep 3, 2023
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.

None yet

3 participants