aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-04-07 16:47:54 -0400
committerCohenArthur <arthur.cohen@embecosm.com>2023-04-14 07:35:37 +0000
commit37d4fa770ff751381db8f4fe225bf9e4ec22be56 (patch)
tree631fa9525e861db8e08941914705bfd94c981c75 /gcc/rust
parent47b92ff1835ea0aa27c490600c40ae2ddb8681a1 (diff)
downloadgcc-37d4fa770ff751381db8f4fe225bf9e4ec22be56.zip
gcc-37d4fa770ff751381db8f4fe225bf9e4ec22be56.tar.gz
gcc-37d4fa770ff751381db8f4fe225bf9e4ec22be56.tar.bz2
Handle underscore in MacroMatch.
gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_macro_match): Handle underscore. gcc/testsuite/ChangeLog: * rust/compile/macro51.rs: New test.
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index a7ed23e..d7eebc2 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -2081,6 +2081,7 @@ Parser<ManagedTokenSource>::parse_macro_match ()
case WHILE:
case YIELD:
case IDENTIFIER:
+ case UNDERSCORE:
// macro fragment
return parse_macro_match_fragment ();
case LEFT_PAREN: