about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-04-09 05:58:46 +0200
committerGitHub <noreply@github.com>2022-04-09 05:58:46 +0200
commit8f4680e37caefc856fe3bb31d18c69f1e2b8cc16 (patch)
treedc79220c1151a25b182b0ee5f9e402b632991a72 /src
parent747bd16214444ca669934459aaee623ce24cc292 (diff)
parent5e8bd9bbaaaa842e96a3ddef3a75208d0c96ffe7 (diff)
downloadrust-8f4680e37caefc856fe3bb31d18c69f1e2b8cc16.tar.gz
rust-8f4680e37caefc856fe3bb31d18c69f1e2b8cc16.zip
Rollup merge of #95804 - GuillaumeGomez:empty-doc-comment-with-backline, r=notriddle
rustdoc: Fix empty doc comment with backline ICE

Fixes #95800.

r? ```@notriddle```
Diffstat (limited to 'src')
-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 = "
+"]
+}