summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/mixing-doc-comments-and-attrs.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/rustdoc/mixing-doc-comments-and-attrs.rs
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc/mixing-doc-comments-and-attrs.rs')
-rw-r--r--tests/rustdoc/mixing-doc-comments-and-attrs.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/rustdoc/mixing-doc-comments-and-attrs.rs b/tests/rustdoc/mixing-doc-comments-and-attrs.rs
new file mode 100644
index 000000000..010058361
--- /dev/null
+++ b/tests/rustdoc/mixing-doc-comments-and-attrs.rs
@@ -0,0 +1,25 @@
+#![crate_name = "foo"]
+
+// @has 'foo/struct.S1.html'
+// @snapshot S1_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]'
+
+#[doc = "Hello world!\n\n"]
+/// Goodbye!
+#[doc = " Hello again!\n"]
+pub struct S1;
+
+// @has 'foo/struct.S2.html'
+// @snapshot S2_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]'
+
+/// Hello world!
+///
+#[doc = "Goodbye!"]
+/// Hello again!
+pub struct S2;
+
+// @has 'foo/struct.S3.html'
+// @snapshot S3_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]'
+/** Par 1
+*/ ///
+/// Par 2
+pub struct S3;