diff --git a/tests/source/issue_5997.rs b/tests/source/issue_5997.rs new file mode 100644 index 00000000000..d184c760f62 --- /dev/null +++ b/tests/source/issue_5997.rs @@ -0,0 +1,15 @@ +// rustfmt-version: Two + +// This formats with two spaces: +pub struct Newtype( + /// Doc + #[doc()] // + pub Vec, +); + +// This formats with one: +pub struct Newtype( + /// Doc + #[doc()] + pub Vec, +); diff --git a/tests/target/issue_5997.rs b/tests/target/issue_5997.rs new file mode 100644 index 00000000000..881bc0fcb98 --- /dev/null +++ b/tests/target/issue_5997.rs @@ -0,0 +1,15 @@ +// rustfmt-version: Two + +// This formats with two spaces: +pub struct Newtype( + /// Doc + #[doc()] // + pub Vec, +); + +// This formats with one: +pub struct Newtype( + /// Doc + #[doc()] + pub Vec, +);