Skip to content

Commit a7801aa

Browse files
ytmimicalebcartwright
authored andcommitted
Add test for issue 3987
Closes 3987 It's unclear which commit resolved this issue, but it can no longer be reproduced.
1 parent 7432422 commit a7801aa

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// rustfmt-format_macro_bodies: true
2+
3+
// with comments
4+
macro_rules! macros {
5+
() => {{
6+
Struct {
7+
field: (
8+
42 + //comment 1
9+
42
10+
//comment 2
11+
),
12+
};
13+
}};
14+
}
15+
16+
// without comments
17+
macro_rules! macros {
18+
() => {{
19+
Struct {
20+
field: (
21+
42 +
22+
42
23+
),
24+
};
25+
}};
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// rustfmt-format_macro_bodies: false
2+
3+
// with comments
4+
macro_rules! macros {
5+
() => {{
6+
Struct {
7+
field: (
8+
42 + //comment 1
9+
42
10+
//comment 2
11+
),
12+
};
13+
}};
14+
}
15+
16+
// without comments
17+
macro_rules! macros {
18+
() => {{
19+
Struct {
20+
field: (
21+
42 +
22+
42
23+
),
24+
};
25+
}};
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// rustfmt-format_macro_bodies: true
2+
3+
// with comments
4+
macro_rules! macros {
5+
() => {{
6+
Struct {
7+
field: (
8+
42 + //comment 1
9+
42
10+
//comment 2
11+
),
12+
};
13+
}};
14+
}
15+
16+
// without comments
17+
macro_rules! macros {
18+
() => {{
19+
Struct { field: (42 + 42) };
20+
}};
21+
}

0 commit comments

Comments
 (0)