about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-08 15:30:53 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-08 15:30:53 +0200
commit5e8bd9bbaaaa842e96a3ddef3a75208d0c96ffe7 (patch)
tree98450715b16008c44c0917cbfc71e702ca38ef6e
parent43d0497824d3d1a6f0b15d865a00715537673af2 (diff)
downloadrust-5e8bd9bbaaaa842e96a3ddef3a75208d0c96ffe7.tar.gz
rust-5e8bd9bbaaaa842e96a3ddef3a75208d0c96ffe7.zip
Add test for empty doc comments with a backline
-rw-r--r--src/test/rustdoc/empty-doc-comment.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/rustdoc/empty-doc-comment.rs b/src/test/rustdoc/empty-doc-comment.rs
new file mode 100644
index 00000000000..b1dae930e06
--- /dev/null
+++ b/src/test/rustdoc/empty-doc-comment.rs
@@ -0,0 +1,22 @@
+// Ensure that empty doc comments don't panic.
+
+/*!
+*/
+
+///
+///
+pub struct Foo;
+
+#[doc = "
+"]
+pub mod Mod {
+   //!
+   //!
+}
+
+/**
+*/
+pub mod Another {
+   #![doc = "
+"]
+}