public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1071
@ 2022-06-08 12:25 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9011184f38a04f81ba3194b826bec3f30a11c07b

commit 9011184f38a04f81ba3194b826bec3f30a11c07b
Merge: f9c1a14dab4 73532817fd6
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Thu Mar 31 09:56:35 2022 +0000

    Merge #1071
    
    1071: Allow transcribing of zero nodes in certain cases r=CohenArthur a=CohenArthur
    
    When expanding AST fragments containing multiple nodes, we must be aware
    that some cases allow expanding zero or more nodes. Any macro
    transcription that gets parsed as many nodes (ie any transcriber function that calls `parse_many`) needs to be able to parse zero of those nodes and still get expanded properly (basically, removed).
    
    Previously, this would cause a failure to lower the macro invocation which would remain as a child instead of getting stripped/erased.
    
    
    
    Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>

Diff:

 gcc/rust/ast/rust-ast.h                |  3 +--
 gcc/rust/ast/rust-macro.h              |  2 +-
 gcc/rust/expand/rust-macro-builtins.cc |  2 +-
 gcc/rust/expand/rust-macro-expand.cc   | 38 +++++++++++++++++-----------------
 gcc/rust/expand/rust-macro-expand.h    |  4 ++--
 gcc/testsuite/rust/compile/macro41.rs  | 13 ++++++++++++
 6 files changed, 37 insertions(+), 25 deletions(-)


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

only message in thread, other threads:[~2022-06-08 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:25 [gcc/devel/rust/master] Merge #1071 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).