about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-08 06:47:36 +0100
committerGitHub <noreply@github.com>2022-02-08 06:47:36 +0100
commit7d5e2ac5eb78c5d3054267bbec5c31fcf8193507 (patch)
tree0ca562fb593e9faa1a6b2c4b26346ae4a9beab2a /src/test
parentb7f785092d84a4b4dadb08fc9fdfe86b0b6139e6 (diff)
parenta476ec8bd0b1925d349383110b75ff51567d7534 (diff)
downloadrust-7d5e2ac5eb78c5d3054267bbec5c31fcf8193507.tar.gz
rust-7d5e2ac5eb78c5d3054267bbec5c31fcf8193507.zip
Rollup merge of #93715 - GuillaumeGomez:horizontal-trim, r=notriddle
Fix horizontal trim for block doc comments

Fixes #93662.

r? `@notriddle`
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc-ui/block-doc-comment.rs16
-rw-r--r--src/test/rustdoc-ui/block-doc-comment.stdout5
-rw-r--r--src/test/rustdoc/strip-block-doc-comments-stars.rs2
3 files changed, 22 insertions, 1 deletions
diff --git a/src/test/rustdoc-ui/block-doc-comment.rs b/src/test/rustdoc-ui/block-doc-comment.rs
new file mode 100644
index 00000000000..c60dfa3f951
--- /dev/null
+++ b/src/test/rustdoc-ui/block-doc-comment.rs
@@ -0,0 +1,16 @@
+// check-pass
+// compile-flags:--test
+
+// This test ensures that no code block is detected in the doc comments.
+
+pub mod Wormhole {
+    /** # Returns
+     *
+     */
+    pub fn foofoo() {}
+    /**
+     * # Returns
+     *
+     */
+    pub fn barbar() {}
+}
diff --git a/src/test/rustdoc-ui/block-doc-comment.stdout b/src/test/rustdoc-ui/block-doc-comment.stdout
new file mode 100644
index 00000000000..e5c27bebbdb
--- /dev/null
+++ b/src/test/rustdoc-ui/block-doc-comment.stdout
@@ -0,0 +1,5 @@
+
+running 0 tests
+
+test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
+
diff --git a/src/test/rustdoc/strip-block-doc-comments-stars.rs b/src/test/rustdoc/strip-block-doc-comments-stars.rs
index ed2297b4fac..ea28d84f1ff 100644
--- a/src/test/rustdoc/strip-block-doc-comments-stars.rs
+++ b/src/test/rustdoc/strip-block-doc-comments-stars.rs
@@ -1,6 +1,6 @@
 #![crate_name = "foo"]
 
-// The goal of this test is to answer that it won't be generated as a list because
+// The goal of this test is to ensure that it won't be generated as a list because
 // block doc comments can have their lines starting with a star.
 
 // @has foo/fn.foo.html