Skip to content

Commit 7894f70

Browse files
committed
Add test case for issue 5997
1 parent 09dbeda commit 7894f70

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tests/source/issue_5997.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// rustfmt-version: Two
2+
3+
// This formats with two spaces:
4+
pub struct Newtype(
5+
/// Doc
6+
#[doc()] //
7+
pub Vec<u8>,
8+
);
9+
10+
// This formats with one:
11+
pub struct Newtype(
12+
/// Doc
13+
#[doc()]
14+
pub Vec<u8>,
15+
);

tests/target/issue_5997.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// rustfmt-version: Two
2+
3+
// This formats with two spaces:
4+
pub struct Newtype(
5+
/// Doc
6+
#[doc()] //
7+
pub Vec<u8>,
8+
);
9+
10+
// This formats with one:
11+
pub struct Newtype(
12+
/// Doc
13+
#[doc()]
14+
pub Vec<u8>,
15+
);

0 commit comments

Comments
 (0)