gccrs: parser: Improve parsing of complex generic arguments
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 1 Feb 2023 11:41:47 +0000 (12:41 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 6 Apr 2023 08:47:19 +0000 (10:47 +0200)
commit2af66ebd1d83f8b0706805fd650f18bd8c8effe7
treefa264171bf7799bea5212c03fc1efb9532ab3d33
parent86f53e5853d2b058e76235624c6988362ef4151e
gccrs: parser: Improve parsing of complex generic arguments

The parser was missing code for handling complex type arguments such
as type paths or nested generics.

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h (Parser::parse_generic_arg): Handle type
paths and nested generics properly.

gcc/testsuite/ChangeLog:

* rust/compile/parse_complex_generic_application.rs: New test.
* rust/compile/parse_complex_generic_application2.rs: New test.
gcc/rust/parse/rust-parse-impl.h
gcc/testsuite/rust/compile/parse_complex_generic_application.rs [new file with mode: 0644]
gcc/testsuite/rust/compile/parse_complex_generic_application2.rs [new file with mode: 0644]