Merge pull request #3500 from rchaser53/issue-3499

fix not to delete semicolon for macro with square brackets
This commit is contained in:
Stéphane Campinas 2019-04-09 15:40:18 +02:00 committed by GitHub
commit 35504acc6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -274,6 +274,9 @@ pub fn rewrite_macro_inner(
DelimToken::Paren if position == MacroPosition::Item => {
Some(format!("{}();", macro_name))
}
DelimToken::Bracket if position == MacroPosition::Item => {
Some(format!("{}[];", macro_name))
}
DelimToken::Paren => Some(format!("{}()", macro_name)),
DelimToken::Bracket => Some(format!("{}[]", macro_name)),
DelimToken::Brace => Some(format!("{} {{}}", macro_name)),

View File

@ -0,0 +1 @@
test![];