File tree 2 files changed +11
-1
lines changed
testsuite/rust/compile/macros/mbe
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -877,7 +877,10 @@ Parser<ManagedTokenSource>::parse_attr_input ()
877
877
return attr_input_lit;
878
878
}
879
879
break;
880
+ case RIGHT_PAREN:
880
881
case RIGHT_SQUARE:
882
+ case RIGHT_CURLY:
883
+ case END_OF_FILE:
881
884
// means AttrInput is missing, which is allowed
882
885
return nullptr;
883
886
default:
@@ -11911,7 +11914,7 @@ Parser<ManagedTokenSource>::skip_after_end_attribute ()
11911
11914
{
11912
11915
const_TokenPtr t = lexer.peek_token ();
11913
11916
11914
- while (t->get_id () != RIGHT_SQUARE)
11917
+ while (t->get_id () != RIGHT_SQUARE && t->get_id () != END_OF_FILE )
11915
11918
{
11916
11919
lexer.skip_token ();
11917
11920
t = lexer.peek_token ();
Original file line number Diff line number Diff line change
1
+ macro_rules! foo {
2
+ ( $x: meta) => { 0 }
3
+ }
4
+
5
+ pub fn main ( ) -> i32 {
6
+ foo ! ( Clone )
7
+ }
You can’t perform that action at this time.
0 commit comments