From 1ec9b3b750904091398839ff8314dfb052993cf3 Mon Sep 17 00:00:00 2001 From: QuietMisdreavus Date: Mon, 6 Nov 2017 15:10:58 -0600 Subject: [PATCH 1/2] tweak notes on ignore/compile_fail examples --- src/librustdoc/html/highlight.rs | 2 +- src/librustdoc/html/markdown.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 }; From 02b3785f844d5c430484497d097482828eba264d Mon Sep 17 00:00:00 2001 From: QuietMisdreavus Date: Mon, 13 Nov 2017 11:44:19 -0600 Subject: [PATCH 2/2] update codeblock-title test with new notice text --- src/test/rustdoc/codeblock-title.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ///