We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f72783 commit 0c20a1fCopy full SHA for 0c20a1f
gcc/rust/parse/rust-parse-impl.h
@@ -1053,6 +1053,7 @@ Parser<ManagedTokenSource>::parse_identifier_or_keyword_token ()
1053
}
1054
else
1055
{
1056
+ add_error (Error (t->get_locus (), "expected keyword or identifier"));
1057
return nullptr;
1058
1059
gcc/testsuite/rust/compile/macros/mbe/macro-issue4054.rs
@@ -0,0 +1,14 @@
1
+#[allow(path_statements)]
2
+
3
+macro_rules! array_impl_default {
4
+ {$t:ident} => {
5
+ $t;
6
+ array_impl_default!{}
7
+ };
8
+ {} => {}
9
+}
10
11
+pub fn foo() {
12
+ let x = 12;
13
+ array_impl_default! {x}
14
0 commit comments