From: Arthur Cohen Date: Mon, 20 Mar 2023 01:58:55 +0000 (+0100) Subject: gccrs: ast: Dump each MacroRule properly without the extra semicolon X-Git-Tag: basepoints/gcc-15~2748 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d6fd110c803b545037e0f148d189e6609884399;p=thirdparty%2Fgcc.git gccrs: ast: Dump each MacroRule properly without the extra semicolon Having the extra semicolon causes parsing errors when importing macros exported using the AST dump, as no rule expects multiple tokens after a single macro rule definition. gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Remove extraneous semicolon when dumping macro rules. --- diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 23ce376ea4b7..2335ffdddb80 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -1532,7 +1532,6 @@ Dump::visit (MacroRule &rule) visit (rule.get_matcher ()); stream << " => "; visit (rule.get_transcriber ().get_token_tree ()); - stream << ";"; } void