From b08b2daeb6da2f77be50a53cdca2098fb3bb11b2 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Thu, 31 Mar 2022 18:15:51 -0400 Subject: [PATCH] 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. --- tests/target/issue_3937.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/target/issue_3937.rs 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, +}