File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -303,9 +303,9 @@ fn rewrite_macro_inner(
303
303
304
304
if DelimToken :: Brace != style {
305
305
loop {
306
- if let Some ( arg) = parse_macro_arg ( & mut parser) {
306
+ if let Some ( arg) = check_keyword ( & mut parser) {
307
307
arg_vec. push ( arg) ;
308
- } else if let Some ( arg) = check_keyword ( & mut parser) {
308
+ } else if let Some ( arg) = parse_macro_arg ( & mut parser) {
309
309
arg_vec. push ( arg) ;
310
310
} else {
311
311
return return_macro_parse_failure_fallback ( context, shape. indent , mac. span ) ;
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ impl<'a> OverflowableItem<'a> {
122
122
pub ( crate ) fn is_simple ( & self ) -> bool {
123
123
match self {
124
124
OverflowableItem :: Expr ( expr) => is_simple_expr ( expr) ,
125
+ OverflowableItem :: MacroArg ( MacroArg :: Keyword ( ..) ) => true ,
125
126
OverflowableItem :: MacroArg ( MacroArg :: Expr ( expr) ) => is_simple_expr ( expr) ,
126
127
OverflowableItem :: NestedMetaItem ( nested_meta_item) => match nested_meta_item {
127
128
ast:: NestedMetaItem :: Literal ( ..) => true ,
Original file line number Diff line number Diff line change
1
+ // rustfmt-edition: 2018
2
+
3
+ macro_rules! token {
4
+ ( $t: tt) => { } ;
5
+ }
6
+
7
+ fn main ( ) {
8
+ token ! ( dyn) ;
9
+ token ! ( dyn ) ;
10
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-edition: 2018
2
+
3
+ macro_rules! token {
4
+ ( $t: tt) => { } ;
5
+ }
6
+
7
+ fn main ( ) {
8
+ token ! ( dyn) ;
9
+ token ! ( dyn) ;
10
+ }
You can’t perform that action at this time.
0 commit comments