about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/issue-60482.rs9
-rw-r--r--src/test/rustdoc/process-termination.rs12
2 files changed, 21 insertions, 0 deletions
diff --git a/src/test/rustdoc/issue-60482.rs b/src/test/rustdoc/issue-60482.rs
new file mode 100644
index 00000000000..0fd1daa746d
--- /dev/null
+++ b/src/test/rustdoc/issue-60482.rs
@@ -0,0 +1,9 @@
+// This code caused a panic in `pulldown-cmark` 0.4.1.
+
+pub const BASIC_UNICODE: bool = true;
+
+
+/// # `BASIC_UNICODE`: `A` `|`
+/// ```text
+/// ```
+pub const BASIC_FONTS: bool = true;
diff --git a/src/test/rustdoc/process-termination.rs b/src/test/rustdoc/process-termination.rs
index 32258792b6e..31ae0143d47 100644
--- a/src/test/rustdoc/process-termination.rs
+++ b/src/test/rustdoc/process-termination.rs
@@ -21,4 +21,16 @@
 /// Err("This is returned from `main`, leading to panic")?;
 /// Ok::<(), &'static str>(())
 /// ```
+///
+/// This also works with `Option<()>`s now:
+///
+/// ```rust
+/// Some(())
+/// ```
+///
+/// ```rust,should_panic
+/// let x: &[u32] = &[];
+/// let _ = x.iter().next()?;
+/// Some(())
+/// ```
 pub fn check_process_termination() {}