about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-03-15 17:54:30 -0700
committerBrian Anderson <banderson@mozilla.com>2015-03-23 14:40:25 -0700
commit7770ea706b2ba10ebf9112b38af9aaad5cc6f24c (patch)
tree1d073b563d6f152cd7ec69cd9625f8de026b51d8 /src/librustdoc/html
parent3d365f6a01c4ebd7847ef7ec64afdcc54129a055 (diff)
downloadrust-7770ea706b2ba10ebf9112b38af9aaad5cc6f24c.tar.gz
rust-7770ea706b2ba10ebf9112b38af9aaad5cc6f24c.zip
rustdoc: Add #[doc(test(no_inject_crate))] attribute
So that collections doctests don't automatically fail themselves
by injecting `extern crate collections` when they are mostly
using the std facade.
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/markdown.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index 7ea5bd569e1..cdd8457687a 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -230,7 +230,7 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
                         stripped_filtered_line(l).unwrap_or(l)
                     }).collect::<Vec<&str>>().connect("\n");
                     let krate = krate.as_ref().map(|s| &**s);
-                    let test = test::maketest(&test, krate, false, false);
+                    let test = test::maketest(&test, krate, false, false, true);
                     s.push_str(&format!("<span class='rusttest'>{}</span>", Escape(&test)));
                 });
                 s.push_str(&highlight::highlight(&text,