about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorYacin Tmimi <yacintmimi@gmail.com>2022-03-31 18:15:51 -0400
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2022-05-17 17:17:07 -0500
commitb08b2daeb6da2f77be50a53cdca2098fb3bb11b2 (patch)
treea60c4aedd57797823e872d968ed8e881902abaf0 /tests
parent8a4c05865be17bac75b8d53eae5be18d749a0f5c (diff)
downloadrust-b08b2daeb6da2f77be50a53cdca2098fb3bb11b2.tar.gz
rust-b08b2daeb6da2f77be50a53cdca2098fb3bb11b2.zip
Add test for issue 3937
Closes 3937

It's unclear which change fixed the `format_code_in_doc_comments=true`
issue brought up in this issue, however I'm unable to reproduce the
error on the current master.

The added test cases should serve to prevent a regression.
Diffstat (limited to 'tests')
-rw-r--r--tests/target/issue_3937.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/target/issue_3937.rs b/tests/target/issue_3937.rs
new file mode 100644
index 00000000000..80673108500
--- /dev/null
+++ b/tests/target/issue_3937.rs
@@ -0,0 +1,13 @@
+// rustfmt-format_code_in_doc_comments:true
+
+struct Foo {
+    // a: i32,
+    //
+    // b: i32,
+}
+
+struct Foo {
+    a: i32,
+    //
+    // b: i32,
+}