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() {}