From 0977bca5ed8407cf0d340eaf466637e88baa211d Mon Sep 17 00:00:00 2001 From: topecongiro Date: Wed, 23 May 2018 23:29:18 +0900 Subject: [PATCH] Add a test for #2691 --- tests/source/doc-comment-with-example.rs | 12 ++++++++++++ tests/target/doc-comment-with-example.rs | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/source/doc-comment-with-example.rs create mode 100644 tests/target/doc-comment-with-example.rs diff --git a/tests/source/doc-comment-with-example.rs b/tests/source/doc-comment-with-example.rs new file mode 100644 index 000000000000..683ad789baf2 --- /dev/null +++ b/tests/source/doc-comment-with-example.rs @@ -0,0 +1,12 @@ +// rustfmt-wrap_comments: true + +/// Foo +/// +/// # Example +/// ``` +/// # #![cfg_attr(not(dox), feature(cfg_target_feature, target_feature, stdsimd))] +/// # #![cfg_attr(not(dox), no_std)] +/// fn foo() { } +/// ``` +/// +fn foo() {} diff --git a/tests/target/doc-comment-with-example.rs b/tests/target/doc-comment-with-example.rs new file mode 100644 index 000000000000..720e337ad4ed --- /dev/null +++ b/tests/target/doc-comment-with-example.rs @@ -0,0 +1,12 @@ +// rustfmt-wrap_comments: true + +/// Foo +/// +/// # Example +/// ``` +/// # #![cfg_attr(not(dox), feature(cfg_target_feature, target_feature, stdsimd))] +/// # #![cfg_attr(not(dox), no_std)] +/// fn foo() {} +/// ``` +/// +fn foo() {}