File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -288,10 +288,12 @@ where
288
288
let inner_item = item. item . as_ref ( ) . or_else ( |err| Err ( err. clone ( ) ) ) ?;
289
289
let first = i == 0 ;
290
290
let last = iter. peek ( ) . is_none ( ) ;
291
- let mut separate = match sep_place {
292
- SeparatorPlace :: Front => !first,
293
- SeparatorPlace :: Back => !last || trailing_separator,
294
- } ;
291
+ let ends_with_semi = inner_item. ends_with ( ";" ) ;
292
+ let mut separate = !ends_with_semi
293
+ && match sep_place {
294
+ SeparatorPlace :: Front => !first,
295
+ SeparatorPlace :: Back => !last || trailing_separator,
296
+ } ;
295
297
let item_sep_len = if separate { sep_len } else { 0 } ;
296
298
297
299
// Item string may be multi-line. Its length (used for block comment alignment)
Original file line number Diff line number Diff line change
1
+ macro_rules! reproduce {
2
+ ( type Fail = $ty: ty; arr = $( $arr: expr) ,* ) => {
3
+ ( vec![ $( $arr) ,+] )
4
+ } ;
5
+ }
6
+
7
+ fn main ( ) {
8
+ reproduce ! ( type Fail = char ; arr = 1 ) ;
9
+ }
Original file line number Diff line number Diff line change
1
+ macro_rules! reproduce {
2
+ ( type Fail = $ty: ty; arr = $( $arr: expr) ,* ) => {
3
+ ( vec![ $( $arr) ,+] )
4
+ } ;
5
+ }
6
+
7
+ fn main ( ) {
8
+ reproduce ! ( type Fail = char ; arr = 1 ) ;
9
+ }
You can’t perform that action at this time.
0 commit comments