aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-11-20 15:41:39 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-30 12:36:44 +0100
commit72792563e60fb56b42c2e96b3ae27d28e09c2e7d (patch)
tree995e7a3930a3162cf43fa392238fe32e3078e0b4 /gcc/rust/parse
parent4f45c715b83b91fe3c5a326a3474c7cebeefc09f (diff)
downloadgcc-72792563e60fb56b42c2e96b3ae27d28e09c2e7d.zip
gcc-72792563e60fb56b42c2e96b3ae27d28e09c2e7d.tar.gz
gcc-72792563e60fb56b42c2e96b3ae27d28e09c2e7d.tar.bz2
gccrs: Add ast validation check on union variant number
Unions with zero fields are forbidden. Add regression test for empty unions. gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add zero field check during ast validation pass. * checks/errors/rust-ast-validation.h: Add union visit function prototype. gcc/testsuite/ChangeLog: * rust/compile/const_generics_8.rs: Fill the union with dummy values. * rust/compile/empty_union.rs: New test. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/parse')
0 files changed, 0 insertions, 0 deletions