aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2021-06-23 22:15:36 +0200
committerPhilip Herron <philip.herron@embecosm.com>2021-06-24 11:07:37 +0100
commitc41d5a20d34d11109142140a7a1db23d67ddf839 (patch)
treede6518392abf835f285e7951c0656d7394333ba2 /gcc/rust/backend/rust-compile-expr.h
parent595ae7743c93bfda40a5914d15ae0db2e7e57301 (diff)
downloadgcc-c41d5a20d34d11109142140a7a1db23d67ddf839.zip
gcc-c41d5a20d34d11109142140a7a1db23d67ddf839.tar.gz
gcc-c41d5a20d34d11109142140a7a1db23d67ddf839.tar.bz2
Handle empty/unit tuple enum variants in the parser.
A tuple enum variant can be empty, in which case it is a unit enum variant. Handle this in Parser<ManagedTokenSource>::parse_enum_item by creating a empty tuple_field vector instead of calling parse_tuple_fields. Add a testcase to show empty tuple enum variant types are now accepted. But note some part of the test is commented out because using the enum type isn't actually possible right now.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions