]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: [gccrs#2324] Add error message for E0532
authorLiam Naddell <liam.naddell@mail.utoronto.ca>
Sat, 3 Aug 2024 05:36:06 +0000 (01:36 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 19 Mar 2025 14:32:03 +0000 (15:32 +0100)
commit04bc5a98a1da2e5cceefede34950d088e7923f06
tree0844b53aa5d49f5124a2ee8da5cf1207bd638991
parentad3fc42abd84b7fc40e78c3a83b883c9b83af22d
gccrs: [gccrs#2324] Add error message for E0532

gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-pattern.cc:
Emit E0532 when trying to reference a Tuple or Struct variant
using a non Tuple or Struct pattern.

gcc/testsuite/ChangeLog:
* rust/compile/issue-2324-1.rs:
add test for E0532 with tuple enum variant
* rust/compile/issue-2324-2.rs:
add test for E0532 with struct enum variant

Signed-off-by: Liam Naddell <liam.naddell@mail.utoronto.ca>
gcc/rust/typecheck/rust-hir-type-check-pattern.cc
gcc/testsuite/rust/compile/issue-2324-1.rs [new file with mode: 0644]
gcc/testsuite/rust/compile/issue-2324-2.rs [new file with mode: 0644]