about summary refs log tree commit diff
path: root/src/librustdoc/html/markdown.rs
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2025-05-24 14:15:20 -0500
committerbinarycat <binarycat@envs.net>2025-05-24 14:15:20 -0500
commit4ef35bcaef07871f286330c13783d8cc37f9c209 (patch)
tree8d3cafbd035b15e9d384c9abb436c4a01a9a26b5 /src/librustdoc/html/markdown.rs
parent038d599eda4fe3e3d78103fba51ee663df86dadf (diff)
downloadrust-4ef35bcaef07871f286330c13783d8cc37f9c209.tar.gz
rust-4ef35bcaef07871f286330c13783d8cc37f9c209.zip
rustdoc: use descriptive tooltip if doctest is conditionally ignored
fixes https://github.com/rust-lang/rust/issues/141092
Diffstat (limited to 'src/librustdoc/html/markdown.rs')
-rw-r--r--src/librustdoc/html/markdown.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index ad7dfafd90c..987b92fa4e2 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -320,8 +320,10 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
             ))
         });
 
-        let tooltip = if ignore != Ignore::None {
-            highlight::Tooltip::Ignore
+        let tooltip = if ignore == Ignore::All {
+            highlight::Tooltip::IgnoreAll
+        } else if let Ignore::Some(platforms) = ignore {
+            highlight::Tooltip::IgnoreSome(platforms)
         } else if compile_fail {
             highlight::Tooltip::CompileFail
         } else if should_panic {