aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2023-02-01 11:40:13 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2023-04-06 10:47:18 +0200
commit9cbd270632bd0cb6b4fc04fdbc93b170669fa159 (patch)
treeddd03d90a202bb328fac8c6b445dd54c2b5ae694 /gcc/rust/resolve
parentad9d75f50804a983a06e2fdf69772188432359ae (diff)
downloadgcc-9cbd270632bd0cb6b4fc04fdbc93b170669fa159.zip
gcc-9cbd270632bd0cb6b4fc04fdbc93b170669fa159.tar.gz
gcc-9cbd270632bd0cb6b4fc04fdbc93b170669fa159.tar.bz2
gccrs: parser: Allow parsing multiple reference types
The parser now recursively tries to parse a reference type after seeing a `&` or `&&` token. gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_type): Handle double ampersan properly (Parser::parse_reference_type): Call into `parse_reference_type_inner` and wrap double reference types in another `AST::ReferenceType` node (Parser::parse_reference_type_inner): Add parsing implementation which does not care about the leading token (& or &&) (Parser::parse_type_no_bounds): Handle double ampersand properly * parse/rust-parse.h: Declare `parse_reference_type_inner` gcc/testsuite/ChangeLog: * rust/compile/multi_reference_type.rs: New test.
Diffstat (limited to 'gcc/rust/resolve')
0 files changed, 0 insertions, 0 deletions