summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs')
-rw-r--r--tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs
new file mode 100644
index 000000000..128e2daba
--- /dev/null
+++ b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs
@@ -0,0 +1,15 @@
+// compile-flags:--test
+
+// https://github.com/rust-lang/rust/issues/23744
+#![crate_name="issue_23744"]
+
+/// Example of rustdoc incorrectly parsing <code>```rust,should_panic</code>.
+///
+/// ```should_panic
+/// fn main() { panic!("fee"); }
+/// ```
+///
+/// ```rust,should_panic
+/// fn main() { panic!("fum"); }
+/// ```
+pub fn foo() {}