@@ -187,7 +187,7 @@ fn return_macro_parse_failure_fallback(
187187}
188188
189189pub ( crate ) fn rewrite_macro (
190- mac : & ast:: Mac ,
190+ mac : & ast:: MacCall ,
191191 extra_ident : Option < ast:: Ident > ,
192192 context : & RewriteContext < ' _ > ,
193193 shape : Shape ,
@@ -239,7 +239,7 @@ fn check_keyword<'a, 'b: 'a>(parser: &'a mut Parser<'b>) -> Option<MacroArg> {
239239}
240240
241241fn rewrite_macro_inner (
242- mac : & ast:: Mac ,
242+ mac : & ast:: MacCall ,
243243 extra_ident : Option < ast:: Ident > ,
244244 context : & RewriteContext < ' _ > ,
245245 shape : Shape ,
@@ -495,7 +495,7 @@ pub(crate) fn rewrite_macro_def(
495495 None => return snippet,
496496 } ;
497497
498- let mut result = if def. legacy {
498+ let mut result = if def. macro_rules {
499499 String :: from ( "macro_rules!" )
500500 } else {
501501 format ! ( "{}macro" , format_visibility( context, vis) )
@@ -504,7 +504,7 @@ pub(crate) fn rewrite_macro_def(
504504 result += " " ;
505505 result += rewrite_ident ( context, ident) ;
506506
507- let multi_branch_style = def. legacy || parsed_def. branches . len ( ) != 1 ;
507+ let multi_branch_style = def. macro_rules || parsed_def. branches . len ( ) != 1 ;
508508
509509 let arm_shape = if multi_branch_style {
510510 shape
@@ -537,7 +537,7 @@ pub(crate) fn rewrite_macro_def(
537537 . collect :: < Vec < _ > > ( ) ;
538538
539539 let fmt = ListFormatting :: new ( arm_shape, context. config )
540- . separator ( if def. legacy { ";" } else { "" } )
540+ . separator ( if def. macro_rules { ";" } else { "" } )
541541 . trailing_separator ( SeparatorTactic :: Always )
542542 . preserve_newline ( true ) ;
543543
@@ -1186,7 +1186,7 @@ fn next_space(tok: &TokenKind) -> SpaceState {
11861186/// Tries to convert a macro use into a short hand try expression. Returns `None`
11871187/// when the macro is not an instance of `try!` (or parsing the inner expression
11881188/// failed).
1189- pub ( crate ) fn convert_try_mac ( mac : & ast:: Mac , context : & RewriteContext < ' _ > ) -> Option < ast:: Expr > {
1189+ pub ( crate ) fn convert_try_mac ( mac : & ast:: MacCall , context : & RewriteContext < ' _ > ) -> Option < ast:: Expr > {
11901190 let path = & pprust:: path_to_string ( & mac. path ) ;
11911191 if path == "try" || path == "r#try" {
11921192 let ts = mac. args . inner_tokens ( ) ;
@@ -1203,7 +1203,7 @@ pub(crate) fn convert_try_mac(mac: &ast::Mac, context: &RewriteContext<'_>) -> O
12031203 }
12041204}
12051205
1206- pub ( crate ) fn macro_style ( mac : & ast:: Mac , context : & RewriteContext < ' _ > ) -> DelimToken {
1206+ pub ( crate ) fn macro_style ( mac : & ast:: MacCall , context : & RewriteContext < ' _ > ) -> DelimToken {
12071207 let snippet = context. snippet ( mac. span ( ) ) ;
12081208 let paren_pos = snippet. find_uncommented ( "(" ) . unwrap_or ( usize:: max_value ( ) ) ;
12091209 let bracket_pos = snippet. find_uncommented ( "[" ) . unwrap_or ( usize:: max_value ( ) ) ;
0 commit comments