public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1812
@ 2023-02-07 17:54 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-02-07 17:54 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1f96413438de938667d59557306103a809762449

commit 1f96413438de938667d59557306103a809762449
Merge: 71bd5b22726 cddb1f2d9f9
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Fri Feb 3 12:45:58 2023 +0000

    Merge #1812
    
    1812: parser: Allow parsing multiple reference types r=CohenArthur a=CohenArthur
    
    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.
    
    Addresses #1807 partly
    
    Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>

Diff:

 gcc/rust/parse/rust-parse-impl.h                   | 33 ++++++++++++++++++----
 gcc/rust/parse/rust-parse.h                        |  2 ++
 gcc/testsuite/rust/compile/multi_reference_type.rs | 12 ++++++++
 3 files changed, 41 insertions(+), 6 deletions(-)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-07 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 17:54 [gcc/devel/rust/master] Merge #1812 Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).