Merge pull request #3500 from rchaser53/issue-3499
fix not to delete semicolon for macro with square brackets
This commit is contained in:
commit
35504acc6f
@ -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)),
|
||||
|
1
tests/target/issue-3499.rs
Normal file
1
tests/target/issue-3499.rs
Normal file
@ -0,0 +1 @@
|
||||
test![];
|
Loading…
Reference in New Issue
Block a user