diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index 98863b229b511..6b0f209c0c454 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -42,7 +42,7 @@ pub fn render_with_highlighting(src: &str, class: Option<&str>, id: Option<&str> let mut out = Vec::new(); if let Some((tooltip, class)) = tooltip { - write!(out, "
{}
", class, tooltip).unwrap(); } diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 001e773098eb3..34949970081d5 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -228,9 +228,9 @@ impl<'a, I: Iterator>> Iterator for CodeBlocks<'a, I> { )) }); let tooltip = if ignore { - Some(("Be careful when using this code, it's not being tested!", "ignore")) + Some(("This example is not tested", "ignore")) } else if compile_fail { - Some(("This code doesn't compile so be extra careful!", "compile_fail")) + Some(("This example deliberately fails to compile", "compile_fail")) } else { None }; @@ -639,9 +639,9 @@ pub fn render(w: &mut fmt::Formatter, )) }); let tooltip = if ignore { - Some(("Be careful when using this code, it's not being tested!", "ignore")) + Some(("This example is not tested", "ignore")) } else if compile_fail { - Some(("This code doesn't compile so be extra careful!", "compile_fail")) + Some(("This example deliberately fails to compile", "compile_fail")) } else { None }; diff --git a/src/test/rustdoc/codeblock-title.rs b/src/test/rustdoc/codeblock-title.rs index accefd6b65f28..d6cd5a24d915f 100644 --- a/src/test/rustdoc/codeblock-title.rs +++ b/src/test/rustdoc/codeblock-title.rs @@ -12,8 +12,8 @@ // ignore-tidy-linelength -// @has foo/fn.bar.html '//*[@class="tooltip compile_fail"]/span' "This code doesn't compile so be extra careful!" -// @has foo/fn.bar.html '//*[@class="tooltip ignore"]/span' "Be careful when using this code, it's not being tested!" +// @has foo/fn.bar.html '//*[@class="tooltip compile_fail"]/span' "This example deliberately fails to compile" +// @has foo/fn.bar.html '//*[@class="tooltip ignore"]/span' "This example is not tested" /// foo ///