summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/doctest-markdown-inline-parse-23744.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
commitcec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch)
tree47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /tests/rustdoc/doctest-markdown-inline-parse-23744.rs
parentAdding debian version 1.74.1+dfsg1-1. (diff)
downloadrustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz
rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc/doctest-markdown-inline-parse-23744.rs')
-rw-r--r--tests/rustdoc/doctest-markdown-inline-parse-23744.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc/doctest-markdown-inline-parse-23744.rs b/tests/rustdoc/doctest-markdown-inline-parse-23744.rs
new file mode 100644
index 000000000..128e2daba
--- /dev/null
+++ b/tests/rustdoc/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() {}