Skip to content

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 <[email protected]>
@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
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.

3 participants